\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{array}
\usepackage{color}
\usepackage{graphicx}
\usepackage{float}
\usepackage{flafter}
\usepackage[hidelinks]{hyperref}
\usepackage{listings}
\usepackage[margin=2cm]{geometry}
\usepackage{setspace}
\usepackage{natbib}
\usepackage{proof}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{wrapfig}
\usepackage [english]{babel}
\usepackage{grffile}
\usepackage{tikz}
\usepackage{pgfplots}
%\usepackage[tikz]{bclogo}
\usetikzlibrary{chains}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usepackage{lscape}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{pdfpages}
\usepackage{booktabs}
\usepackage{pgfgantt}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\bibliographystyle{apsr}
\bibpunct{(}{)}{;}{a}{,}{,}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\setlength{\tabcolsep}{.18cm}
\usepackage{fancyvrb}
\usepackage{etoc}
\usepackage{sectsty}
\sectionfont{\fontsize{14}{14}\selectfont}
\subsectionfont{\fontsize{12}{12}\selectfont}

% ==Cross Referencing Different Docs
\usepackage{xr}
\externaldocument{EfficacyRole_JEPS_final}

\usepackage{titlesec}

\makeatletter
\@addtoreset{section}{part}
\@addtoreset{figure}{part}
\@addtoreset{table}{part}
\makeatother
\titleformat{\part}[display]
{\normalfont\LARGE\bfseries}{}{0pt}{}

\makeatletter
\renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{2.6em}}
\renewcommand{\l@subsection}{\@dottedtocline{2}{4.0em}{3.6em}}
\renewcommand{\l@subsubsection}{\@dottedtocline{3}{7.4em}{4.5em}}
\makeatother

% === new commands ===
\newcommand\ud{\mathrm{d}}
\newcommand\dist{\buildrel\rm d\over\sim}
\newcommand\ind{\stackrel{\rm indep.}{\sim}}
\newcommand\iid{\stackrel{\rm i.i.d.}{\sim}}
\newcommand\logit{{\rm logit}}
\renewcommand\r{\right}
\renewcommand\l{\left}
\newcommand\Var{{\rm Var}}
\newcommand\var{{\rm var}}
\newcommand\Cov{{\rm Cov}}
\newcommand\E{\mathbb{E}}
\newcommand\V{\mathbb{V}}
\newcommand\cN{\mathcal{N}}
\newcommand\cS{\mathcal{S}}
\newcommand\cX{\mathcal{X}}
\newcommand\wX{\widetilde{X}}
\newcommand{\diag}{\mathop{\mathrm{diag}}}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\newcommand{\indep}{\mbox{$\perp\!\!\!\perp$}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\DeclareMathOperator{\sgn}{sgn}
\providecommand{\norm}[1]{\lVert#1\rVert}

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist 

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{P}[1]{>{\raggedright\tabularxbackslash}p{#1}}

\newcounter{myWeekNum} %for gantt
\stepcounter{myWeekNum}
%
\newcommand{\myWeek}{\themyWeekNum
    \stepcounter{myWeekNum}
    \ifnum\themyWeekNum=53
         \setcounter{myWeekNum}{1}
    \else\fi
}

\newenvironment{bluetext}{\color{blue}}{\ignorespacesafterend}

\begin{document}


<<eval=TRUE, echo=FALSE, results='hide', message=FALSE>>= 

require(knitr, quietly = TRUE)

opts_chunk$set(cache = TRUE,
               cache.path = 'cache_appendix/',
               fig.path = 'figures_appendix/', 
               tidy = TRUE, 
               echo = FALSE, 
               warning = FALSE, 
               message = FALSE, 
               fig.pos = 'H',
               dev = 'pdf', 
               dpi=200)

options(width = 110, digits = 2)
@

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

<<eval=TRUE, echo = FALSE, tidy=TRUE, warning=FALSE, error=FALSE, message=FALSE>>=


### load packages and functions
source("../code/VP_functions.R")

### Read in shape files
district.shp <- readOGR("../data/shapefiles/Districts.shp", verbose = FALSE)
TAN_outline <- readOGR("../data/shapefiles/TAN_outline.shp", verbose = FALSE)

### Bukoba study data
source("../code/VP_bukoba_dataclean.R")

### Kilosa study data
source("../code/VP_kilosa_dataclean.R")

### Qualitative data
source("../code/VP_bukoba_qual1_dataclean.R")
source("../code/VP_bukoba_qual2_dataclean.R")

@


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{{\Large \bf Self-efficacy and Citizen Engagement in Development:\\ Experimental Evidence from Tanzania\\ {\large Supplementary Information for Online Publication}}\footnote{The
data, code, and any additional materials required to replicate all analyses in this article are available at
the Journal of Experimental Political Science Dataverse within the Harvard Dataverse Network, at: \url{https://doi.org/10.7910/DVN/SLYEUJ}. Our pre-analysis plans can be found at \url{https://osf.io/jqzxp/} for Study 1 and \url{https://osf.io/9xmjg/} for Study 2. 
This research received institutional review board (IRB) approval from MIT COUHES ($\#$1603517857R001). 
All errors and omissions are ours.}
}

\author{Evan Lieberman\thanks{Department of Political Science, MIT. Email: \href{evanlieb@mit.edu}{evanlieb@mit.edu}. Address: 77 Massachusetts Avenue E53-409, Cambridge, MA 02142.} \hspace{2cm} Yang-Yang Zhou\thanks{Department of Political Science, University of British Columbia. Email: \href{yangyang.zhou@ubc.ca}{yangyang.zhou@ubc.ca}. Address: 323 C.K. Choi Building 1855 West Mall, Vancouver, British Columbia, V6T 1Z2.}
\thanks{Authors contributed equally. Author order randomized using \url{https://randomizeauthor.shinyapps.io/shiny/}}
}

\date{\today}

%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%

\renewcommand{\harvardurl}{URL: \url}

\maketitle

%To number supplemental material with 'S': 
%\renewcommand{\thesection}{S\arabic{section}}   
\renewcommand{\thetable}{S\arabic{table}}   
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\theequation}{S\arabic{equation}}


\newpage
\part{Supplementary Information}

\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
\tableofcontents

\setstretch{1.5}

\newpage
\section{Descriptive Statistics and Figures}
\label{sec:SIdescript}

Figure \ref{fig:studymaps} shows the study schools in our two study districts, Bukoba and Kilosa. We selected these districts because they are largely rural and have a substantial number of schools performing under the national average. We avoided already high-performing schools, because we wanted to identify schools for which we could credibly inform citizens that their schools needed improvement. We also avoided the lowest performing schools, under the assumption that there might be unobserved constraints on their performance, making the effects of our treatment unlikely. 

<<studymaps, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 8, fig.height = 5.3, fig.pos = 'H', fig.align='center', out.width= "1\\linewidth", warning=FALSE, message=FALSE, fig.cap="The left map shows the 24 schools in Study 1, located in Bukoba rural district, shown in black in the map of Tanzania (inset). These schools were randomized into the three intervention groups: Survey Only (circle), Information Workshop (triangle), Validated Participation (square), with their respective parent sample sizes. The right map shows the 16 schools in Study 2, located in Kilosa rural district, shown in gray in the map of Tanzania (inset). We randomized the treatments \\textit{within} each of these schools.">>=

## Clean shape file for map
district.shp@data$id <- rownames(district.shp@data)
district.shp.df <- fortify(district.shp)
district.shp.df <- plyr::join(district.shp.df, district.shp@data, by = "id")

#### Phase 1
## Clip to Bukoba
bukoba.df <- district.shp.df[district.shp.df$District_N == "Bukoba",]

#Bring in sampled schools
sample.shp <- SpatialPointsDataFrame(cbind(Bukstudyschools$LONGITUDE,
                                           Bukstudyschools$LATITUDE),
                                     data = Bukstudyschools,
                                     proj4string = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84"))

sample.shp$InterventionType <- factor(sample.shp$InterventionType, 
                                      levels = c("Survey Only", 
                                                 "Info Workshop", 
                                                 "Validated Participation"))
set.seed(17)

# Plot
study1map <- ggplot() +
    geom_path(data = bukoba.df, aes(x = long, y = lat, group = group), 
              colour = "gray10", size = .3) +
    geom_point(data = as.data.frame(sample.shp), 
               aes(x = LONGITUDE, y = LATITUDE, 
               shape = InterventionType,
               color = InterventionType),
               position = position_jitter(w = 0.016, h = 0.02),
               size = 2,
               alpha = 1) +
    theme(axis.line=element_blank(),
          axis.text.x=element_blank(),
          axis.text.y=element_blank(),
          axis.ticks=element_blank(),
          axis.title.x=element_blank(),
          axis.title.y=element_blank(),
          legend.title=element_blank(),
          legend.key = element_blank(),
          legend.position=c(.783, .23),
          panel.background=element_blank(),
          panel.border=element_blank(),
          panel.grid.major=element_blank(),
          panel.grid.minor=element_blank(),
          plot.background=element_blank()) +
    scale_color_manual(breaks=c("Survey Only", "Info Workshop", "Validated Participation"),
                          labels=c(paste("SO, n =", nrow(SOBuk), sep =" "), 
                                   paste("IW, n =", nrow(IWBuk), sep =" "),
                                   paste("VP, n =", nrow(VPBuk), sep =" ")),
                       values=c("gray70", "gray50", "black")) +
    scale_shape_discrete(breaks=c("Survey Only", "Info Workshop", "Validated Participation"),
                          labels=c(paste("SO, n =", nrow(SOBuk), sep =" "), 
                                   paste("IW, n =", nrow(IWBuk), sep =" "),
                                   paste("VP, n =", nrow(VPBuk), sep =" "))) +
    scaleBar(lon = 31.43, lat = -1.8, distanceLon = 10, distanceLat = 1.5, 
             distanceLegend = 5, dist.unit = "km") +
    annotate("text", x = 31.49, y = -1.84, label = "Bukoba District (Study 1)") +
    coord_fixed(1)


#### Phase 2
## Clip to Kilosa
kilosa.df <- district.shp.df[district.shp.df$District_N == "Kilosa" |
                             district.shp.df$District_N == "Kilosa Urban",]

# Bring in sampled schools
study2map <- ggplot() +
     geom_path(data = kilosa.df, aes(x = long, y = lat, group = group), 
              colour = "gray10", size = .3) +
    geom_point(data = as.data.frame(KilSchoolMain), 
               aes(x = Longitude, y = Latitude), 
               colour = "gray 30",
               shape = 20, 
               size = 3,
               alpha = 1) +
    theme(axis.line=element_blank(),
          axis.text.x=element_blank(),
          axis.text.y=element_blank(),
          axis.ticks=element_blank(),
          axis.title.x=element_blank(),
          axis.title.y=element_blank(),
          legend.title=element_blank(),
          legend.key = element_blank(),
          legend.position=c(0.2, .7),
          panel.background=element_blank(),
          panel.border=element_blank(),
          panel.grid.major=element_blank(),
          panel.grid.minor=element_blank(),
          plot.background=element_blank()) +
    scaleBar(lon = 36.49, lat = -7.83, distanceLon = 25, distanceLat = 4, 
             distanceLegend = 10, dist.unit = "km") +
    annotate("text", x = 36.83, y = -7.92, label = "Kilosa District (Study 2)") +
    coord_fixed(1)


#### Tanzania inset

# Clean shape file for map
TAN_outline@data$id <- rownames(TAN_outline@data)
TAN.df <- fortify(TAN_outline)
TAN.df <- plyr::join(TAN.df, TAN_outline@data, by = "id")

TANmap <- ggplot() +
    geom_path(data = TAN.df, aes(x = long, y = lat, group = group), 
              colour = "gray10", size = .3) +
    geom_polygon(data = bukoba.df, aes(x = long, y = lat, group = group), 
              colour = "black", size = 1) +
    annotate("text", x = 33.3, y = -2.1, label = "Bukoba", size = 3) +
    geom_polygon(data = kilosa.df, aes(x = long, y = lat, group = group), 
              fill = "gray60") +
    annotate("text", x = 36.83, y = -8.5, label = "Kilosa", size = 3) +
    theme(axis.line=element_blank(),
          axis.text.x=element_blank(),
          axis.text.y=element_blank(),
          axis.ticks=element_blank(),
          axis.title.x=element_blank(),
          axis.title.y=element_blank(),
          panel.background=element_blank(),
          panel.border=element_rect(colour = "gray50", fill=NA, size=.6),
          panel.grid.major=element_blank(),
          panel.grid.minor=element_blank(),
          plot.background=element_blank()) +
          coord_fixed(1) 

v1 <- grid::viewport(width = .8, height = .8, x = 0.43, y = 0.5) #plot area for the Bukoba map
v2 <- grid::viewport(width = .8, height = .8, x = 0.8, y = 0.5) #plot area for the Kilosa map
v3 <- grid::viewport(width = 0.4, height = 0.4, x = 0.14, y = 0.75) #plot area for the inset map

print(study1map,vp=v1) 
print(study2map,vp=v2) 
print(TANmap,vp=v3)

@


\newpage
\subsection{Study 1 Bukoba Baseline Summary Statistics}

<<Bukobadescript, eval = TRUE, echo=FALSE, fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

descriptlabels <-  c("Household Size", "Age", 
                     "Education Level", 
                     "SES Index", "No. of Children",
                     "Female", "Household Head", 
                     "Literate", "Muslim", "Political", 
                     "Parent (vs. Caregiver)", 
                     "Child w. Disabilities", 
                     "On School Committee",
                     "Edu Efficacy", 
                     "Edu Internal Efficacy", 
                     "Edu External Efficacy", 
                     "Edu Individual Efficacy", 
                     "Edu Group Efficacy",
                     "Gen Efficacy", 
                     "Checks Homework", 
                     "Gives Breakfast", 
                     "Checks Teacher Absence", 
                     "Child's Test Score (/72)")

studyBukdescript <- subset(studyBuk, select = c("HH1_B", "DM1_B", "BC5_B_num", 
                                            "econindexSUM_B", "CH1_B",
                                            "Female_B","HHhead_B", "literate_B",  
                                            "muslim_B", "political_B", "parent_B", 
                                            "disabilities_B_bi", "SC2_B_bi",
                                            "EEFscore_B", "EEFinternal_B", 
                                            "EEFexternal_B", "EEFindiv_B", 
                                            "EEFgroup_B", 
                                            "GEFscore_B", 
                                            "PP2_B_num", 
                                            "CB1_B_num",
                                            "EQ1_B_num", 
                                            "KFTotal_B"))

stargazer(studyBukdescript,
          title = "Descriptive statistics of Study 1 Bukoba participants at baseline.",
          median = TRUE,
          digits=0, 
          digits.extra=2,
          covariate.labels = descriptlabels,
          font.size = "small",
          label = "tab:Bukdescript")

@


\newpage
\subsection{Study 2 Kilosa Summary Statistics}

<<Kilosadescript, eval = TRUE, echo=FALSE, fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

descriptlabels <-  c("Household Size", 
                     "Age", 
                     "Education Level", 
                     "SES Index", 
                     "No. of Children",
                     "Female", 
                     "Household Head", 
                     "Literate", 
                     "Muslim", 
                     "Political", 
                     "Parent (vs. Caregiver)", 
                     "On School Committee",
                     "Edu Efficacy", 
                     "Edu Internal Efficacy", 
                     "Edu External Efficacy", 
                     "Edu Individual Efficacy", 
                     "Edu Group Efficacy",
                     "Gen Efficacy", 
                     "Checks Homework", 
                     "Gives Breakfast", 
                     "Checks Teacher Absence",
                     "Respected by Parents",
                     "Respected by Authorities",
                     "Ideas Respected",
                     "Raise issue at Mtg",
                     "Raise issue w. Official",
                     "Support Pro-edu Candidate")

studyKildescript <- subset(studyKil, select = c("hh_size", "age", "Education_num", 
                                            "econindexSUM", "Children",
                                            "Female","HHhead", "Literate",  
                                            "Muslim", "Political", 
                                            "Parent", "SCmember",
                                            "EEFscore", "EEFinternal", 
                                            "EEFexternal", "EEFindiv", 
                                            "EEFgroup", 
                                            "GEFscore", 
                                            "AskHW", 
                                            "ChildBreakfast",
                                            "AskAbsent",
                                            "RespectedbyParents",
                                            "RespectedbyAuth",
                                            "RespectedIdeas",
                                            "PubGoodMtg",
                                            "PubGoodDirect",
                                            "Candidate"))

stargazer(studyKildescript,
          title = "Descriptive statistics of Study 2 Kilosa participants.",
          median = TRUE,
          digits=0, 
          digits.extra=2,
          covariate.labels = descriptlabels,
          font.size = "small",
          label = "tab:Kildescript")

@


\newpage
\section{Validated Participation Intervention Details} 
\label{sec:SIintervention}

Our intervention, Validated Participation, is a series of meetings/or one meeting designed to give participants not only information but also opportunities for successful engagement (mastery experiences), validated by peers and an authority figure. In order to evaluate whether this intervention will affect parents in the manner theorized above, we compare estimated changes in parental attitudes and behaviors as well as changes in student performance among those parents who receive this intervention relative to two other groups: a set of parents who simply receive \textit{information} about the quality of schooling and their rights and responsibilities (Information Workshop); and a set of parents who will receive no intervention (Survey Only/Control). Thus, building on the theoretical discussion above, in this section, we describe the three treatment arms of our study -- Validated Participation (VP), Information Workshop (IW), and Survey Only/Control (SO) -- which are randomly assigned to school communities. 
SO schools were not assigned to any meetings, only the baseline and endline measurement, while IW and VP meetings were delivered by trained facilitators with teaching backgrounds over four approximately 90-minute meetings, spaced one week apart. %Although a fully factorial (2 x 2) design is normally desirable to test the independent effects of both dimensions of interactive interventions (in this case, VP and IW), we have no theoretical reason to believe that Validated Participation without information would have any significant impact on parental involvement and so we do not analyze such a treatment condition.

Next, we describe the components of each treatment arm in detail.

\subsection{Information on School Quality, Rights and Responsibilities}

For both VP and IW intervention arms, in the context of meetings, trained facilitators provided parents with information on the progress and needs of their school, what they should come to expect from teachers and school administrators, and what they can do to support their children's education at school and at home. Even if this information is not entirely new to parents, we suspect that its provision is necessary to prompt action. The information provided was gathered from official Ministry of Education reports and from our partner, Twaweza, which specializes in the field of education.

This information emphasized strategies that parents can implement to contribute to their children's education \textit{without} necessitating either systemic change in schools or resources and skills that parents do not already possess. Specifically, the facilitator was trained to: share information that their schools are performing below the national average (a criteria for inclusion into the study); have the head teacher describe the needs of the school; explain how parents can support the roles and responsibilities of teachers and head teachers; provide materials about how parents can also improve their children's learning at home; and explain that education quality is a strong predictor of future economic success.

% \vspace{-.3cm}
% \begin{itemize} 
% \setlength{\itemsep}{-5pt}
% 	\item share information that their schools are performing below the national average (a criteria for inclusion into the study);
% 	\item have the head teacher describe the needs of the school;
% 	\item explain how parents can support the roles and responsibilities of teachers and head teachers;
% 	\item provide materials about how parents can also improve their children's learning at home;
% 	\item explain that education quality is a strong predictor of future economic success.
% \end{itemize}

All \textit{information} delivered in the IW treatment arm was also delivered in the VP arm. The only difference, as we elaborate below, concerned the \textit{style of delivery}. While instructors in both treatment arms were trained to be polite and to answer questions to the best of their ability, in IW meetings, facilitators were instructed to focus on mere delivery of the facts and to present in an authoritative style that is typical of the context: a teacher lecturing the information while students (in this case, parents) listen. In VP meetings, facilitators were instructed to use a more approachable style, and consistent with the intent of the treatment, validate parents' participation with positive affirmation about the quality of their questions.

Importantly, because both the IW and VP interventions involve meetings that bring parents together at the primary schools of their children, any estimated differences in treatment arms cannot be due to the effects of overcoming obstacles to coordination or collective action. 


\subsection{Components unique to Validated Participation}

We designed Validated Participation to provide efficacy-boosting engagement experiences for targeted parents. Various components are repeated across meetings, but updated with new content, with the hope that repetition would lead to reinforcement of the same objective: \emph{to provide parents meaningful opportunities to envision themselves as impactful agents of change, capable of making decisions using evidence, and being valued for both their ideas and their actions.} Moreover, the proposed intervention was conducted on school premises alongside information about education (discussed above), which aimed to increase parents' comfort level with active engagement with school officials and with their own children around matters pertaining to education.\footnote{While this intervention makes use of discussion and deliberation, our theory is quite distinct from that found in the heart of the scholarly literature on the benefits of deliberation for democratic performance \citep[e.g.][]{Przeworski:1998, Stokes:1998}, because our outcome of interest is changes in self-efficacy rather than changes in preferences for democracy or other institutions. Empirical research examining how deliberative decision-making and voting affect efficacy finds some impact on external efficacy but no changes to internal efficacy \citep{Finkel:1985, Morrell:2005}. Thus, Validated Participation not only provides opportunities for discussion and collective decision-making, but also the crucial validation that we theorize will jump-start feelings of both internal and external efficacy.} 

We view the challenge of boosting parental efficacy in a relatively short period of time to be a substantial hurdle. Perceptions of efficacy are generally built up over a lifetime of experiences. Along these lines one could easily imagine that a more thorough-going intervention conducted over an even longer period of time might have more enduring effects. But as a research study, it would also be increasingly more expensive to administer, and would be likely to suffer from greater problems of attrition. The central goal of this experiment is to investigate whether a short-course of intensive validation can substantively affect those perceptions and to evaluate associated behavior change.


\begin{enumerate}
\item \textbf{Validated Participation using Visual Evidence}\\
The first module, \textit{Visual Evidence}, provides parents the opportunity to meaningfully discuss evidence by looking at and engaging with a series of artworks in a facilitated discussion.\footnote{This strategy is inspired by and adapted from an existing curriculum called \textit{Visual Thinking Strategies} (VTS)\footnote{\href{http://www.vtshome.org/what-is-vts}{http://www.vtshome.org/what-is-vts}}, which was designed in the U.S. primarily but not exclusively for school-aged children that aims to increase participation and critical thinking skills through guided discussion of art. We modified this tool for use on adults in an East African setting, but with the common aim of providing an opportunity to facilitate engagement of the type we believe is likely to boost efficacy.} The goal of this module is to give all parents, not just the elite, opportunities to offer their ideas and receive validation. 

%Next, another challenge to parental participation in education could be their discomfort of coming to schools. In Tanzania, school meetings are almost always associated with demands for fee payments. Thus, engaging in Visual Evidence can show parents that schools and learning more generally could be enjoyable, even for parents. 
%``Visual Thinking Strategies is a method initiated by teacher-facilitated discussions of art images and documented to have a cascading positive effect on both teachers and students... [promoting] thinking skills that become habitual and transfer from lesson to lesson, oral and written language literacy, visual literacy, and collaborative interactions among peers....Art is the essential first discussion topic because it enables students to use existing visual and cognitive skills to develop confidence and experience, learning to use what they already know to figure out what they don't; they are then prepared to explore other complex subject matter alone and with peers. Through visual thinking strategies' rigorous group `problem-solving' process, students cultivate a willingness and ability to present their own ideas, while respecting and learning from the perspectives of their peers. Engaged by contributing observations and ideas, the students participate in ...\ lessons in ways they often don't in others."

\begin{figure}[t]
    \centering
    \begin{minipage}{.42\textwidth}
        \centering
        \includegraphics[width=1\linewidth]{figure_inputs/VEimage_teacher.pdf}
    \end{minipage}%
    \begin{minipage}{.58\textwidth}
        \centering
        \includegraphics[width=.97\linewidth]{figure_inputs/VEimage_waiting.pdf}
    \end{minipage}
    \caption{Example images for Visual Evidence}
\end{figure}

We pre-selected a series of images with the goal of having broadly relevant and interesting narrative potential so individuals can easily offer their analyses while many interpretations are possible.\footnote{We selected these images in consultation with VTS trainers and Twaweza staff.} The subject matters center around family life and education, but they do not provide any new information to parents about schools. 

Facilitators were trained to work with the group of parents, in a series of meetings, and focus on getting individuals in that group to respond to three key questions for each work of art presented:
\vspace{-.3cm}
\begin{itemize}
\setlength{\itemsep}{-5pt}
\item What is going on in this picture?
\item What do you see that makes you say that?
\item What more can you find?
\end{itemize}

Throughout the process, the facilitator repeats and emphasizes what each participant says (e.g. ``no right or wrong answers"), \textit{echoes back and validates their ideas} as positive encouragement, and points out relevant details in the image, ultimately helping to broadcast and to reinforce what each person says.

While recognizing that discussing art is an unconventional strategy for promoting efficacy, we believe that this component is an important first step for several reasons. This tool provides opportunities for parents to connect facts and to make inferences about new materials. Because neither outside knowledge, formal schooling, nor literacy is necessary for participants to be successful in discussing art, this tool can serve as a leveler by encouraging participation by all parents not just elite, educated ones. This mitigates concerns of elite capture in which only a few parents, generally older and male with already high efficacy beliefs, will set the agenda for the remaining components of the intervention. To further prevent elite capture, our intervention protocol explicitly instructs facilitators to encourage broad participation across age, gender, religion, etc. 

For those who speak up, this exercise provides them an opportunity to see that their ideas are heard and respected by the facilitator (mastery experience). For those who do not actively participate, at least they could observe parents like themselves who do participate and receive positive feedback (vicarious experiences). In short, efficacy in the political arena demands comfort with being able to express one's opinions about evidence, and Visual Evidence aims to start building that comfort.

\item \textbf{Validated Participation using Resource Vote:}\\
The second module, \textit{Resource Vote}, sought to make explicit connections between an initial boost of self confidence developed in the Visual Evidence module and parents' role in the educational sphere. Specifically, it demonstrated to parents who may have little experience with impactful decision-making -- particularly in the educational sphere -- that their ideas and actions \textit{can} result in the generation of concrete outcomes. 
Inspired in part by \citet{Pradhan:2011} in which parents' election of school committee members sparked other forms of parent participation in education, Resource Vote was designed to allow parents to directly ``elect'' how to spend grants for their schools. Ultimately, the idea of Resource Vote is to create opportunities for engagement that over time changes parents' beliefs about their roles, responsibilities, and abilities to impact their children's learning. 
Specifically, parents were informed that an outside NGO (Twaweza) would like to make a modest contribution to the school, but that the parents must collectively decide how to spend the money. Presented with just two choices, parents were given time to briefly deliberate on the options and then vote in a secret ballot. The option winning the majority of the votes was implemented almost immediately and was physically presented by the facilitator. The resource choices were chalk versus erasers; large rulers versus abacuses; and science posters versus maps of Tanzania. The relatively inexpensive resource options were selected in consultation with local teachers and head teachers as appropriate for responding to local education needs. 

Through three iterations of this module, the scale of resources as well as the time from voting to implementation increased slightly. Following the first meeting's Resource Vote, parents were immediately presented with the chosen resource by the facilitator. The second meeting's chosen resources were presented during the school tour later in the session. And finally the third meeting's chosen resources were presented in the fourth meeting a week later. The aim of this scaling-up was to develop beliefs that impact can be realized even if not observed immediately. Although all the resources were modest in scale, the facilitator was instructed to be upfront and emphasize that the aim of the exercise was for parents to practice discussing and deliberating school needs. 

Since the goal of this intervention was to prompt parental input and not to measure the impact of the resources themselves, the schools in the other treatment arms received the same resources for which the VP groups voted in similar time intervals.

% \item \textbf{Validated Participation on a School Tour:}\\
% In this third module, \textit{School Tour}, parents were led by the head teacher and facilitator on a tour of the school, in which they were provided opportunities to ask about the needs of the school. Additionally, they visited the classroom of their children to present the resource they chose in the previous module. The facilitator was instructed to inform the classroom that this resource was chosen by the parents at the conclusion of a discussion they held about what would be most useful for the students' learning. For many parents in rural Tanzania, they had never seen their own child's classroom much less felt that they could contribute to it, and this turned out to be an exciting opportunity for recognition for the classroom teacher and their own children. The IW parents received lectures from their head teachers to keep the information and exposure to head teachers constant across the two treatment groups. 

\item \textbf{Validated Participation with Peer Validation:}\\
This final module, \textit{Peer Validation}, was implemented only during the last meeting, when the facilitator asked the parents to identify what they can and should do to help their children's education. Recalling the steps of the previous modules, parents discussed and generated a list of ways they can help, not only echoed and validated by the facilitator but validated by each other as peers. Specifically, each contribution by a parent to this list was further recognized and validated by peers. This list was then publicly displayed in the school, further providing public recognition. 

\end{enumerate}

In sum, Validated Participation is a multi-component intervention, but each component was carefully designed to be conceptually consistent with the theorized sources of efficacy: \textit{parents are given equal opportunities to participate in critical discussions of evidence and decision-making in a successful manner, and their ideas and actions are validated by an authority figure and each other}.


\newpage
\section{Educational Self-Efficacy Scale}
\label{sec:SIefficacyscale}

\subsection{Educational Self-Efficacy Scale Index Questions}

The following 9 questions comprise the Educational Self-Efficacy Scale (ESES), with responses ranging on a scale from 1 to 5.

\begin{quote}
\singlespacing
\texttt{\small{1. If a group of parents are having a discussion about issues at the school, how confident are you that you could make a meaningful contribution to this discussion?\\
2. How confident are you that you could find out what is being taught in your child's classroom?\\
3. How confident are you that you could communicate with your child's teacher concerning an issue he faces at school?\\
4. How confident are you that you could communicate with your child's head teacher about any educational questions or other issues concerning you?\\
5. Suppose you made a recommendation during a discussion with other parents about issues at the school, how confident are you that the other parents will take action based on your recommendation?\\
6. Suppose that you had a discussion with your child's head teacher today and that you discussed, for example, the insufficiency of materials available at school for the children. How confident are you that he/she will remember what you discussed one week later?\\
7. How confident are you that he/she will act on the problem you talked about in your discussion?\\
8. Suppose that you with a group of other parents have spoken to the head teacher concerning this issue of lack of school equipment. How confident are you that the head teacher would act on the problem you discussed in your talk?\\
9. How confident are you that people like you can have any influence in making the school better?
}}
\end{quote}

Questions 1-4 measure \textit{internal educational efficacy} while 5-9 measure \textit{external educational efficacy}. Partitioned a different way, questions 2, 3, 4, 6, 7 make up the \textit{individual educational efficacy index} as they ask about taking actions by oneself, while the \textit{group educational efficacy index} comprises questions 1, 5, 8, 9, asking about actions taken as a group. 

\newpage
\subsection{Correlation between Educational and General Self-Efficacy Scores}

<<EEFGEFscatter, eval=TRUE, echo = FALSE, tidy = TRUE, fig.width = 8, fig.height = 4, out.width= "1\\linewidth", fig.align='center', warning=FALSE, message=FALSE, fig.cap="This figure shows the scatterplot and Pearson's correlation between Educational Self-Efficacy Score (x-axis) and the General Self-Efficacy Score (y-axis) for the Study 2 Kilosa (right) and Study 1 Bukoba baseline (left).">>=

cor <- cor.test(studyBuk$EEFscore_B, studyBuk$GEFscore_B)

EEFGEF_Buk <- ggplot(studyBuk, aes(x=EEFscore_B, y=GEFscore_B)) +
    geom_point(shape=1) +    
    xlab("Educational Self-Efficacy Score") +
    ylab("General Self-Efficacy Score") +
    xlim(1, 5) +
    ylim(10, 40) +
    geom_text(aes(label = 
        paste("Pearson's r = ", as.character(round(cor$estimate, 2)),
              ", p-value < .01 "), 
        x = 2.5, y = 12),  size = 3, color = "gray20", family="sans", fontface = "plain") +
    geom_smooth(method=lm,
                color = "black",# Add linear regression line
                se=FALSE) +
        theme(#axis.text.x = element_text(hjust = 1),
        panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8)
        )

cor <- cor.test(studyKil$EEFscore, studyKil$GEFscore)

EEFGEF_Kil <- ggplot(studyKil, aes(x=EEFscore, y=GEFscore)) +
    geom_point(shape=1) +    
    xlab("Educational Self-Efficacy Score") +
    ylab("General Self-Efficacy Score") +
    xlim(1, 5) +
    ylim(10, 40) +
    geom_text(aes(label = 
        paste("Pearson's r = ", as.character(round(cor$estimate, 2)),
              ", p-value < .01 "), 
        x = 2.5, y = 12),  size = 3, color = "gray20", family="sans", fontface = "plain") +
    geom_smooth(method=lm,
                color = "black",# Add linear regression line
                se=FALSE) +
        theme(#axis.text.x = element_text(hjust = 1),
        panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8)
        )

grid.arrange(EEFGEF_Kil, EEFGEF_Buk, ncol = 2)

@



\newpage
\section{Study 1 Bukoba Implementation Plan}
\label{sec:SIbukobaplan}

We conducted Study 1 from August 2016 to January 2017 in Bukoba rural district in Northern Tanzania. This district was selected largely for logistical convenience, because our implementing partner Economic Development Initiatives (EDI) Limited was based in the area. We subsequently learned that Bukoba has a relatively high concentration of people with educational degrees and parents sending their children to school, likely due to the fact it was the site of German missionary education efforts starting in 1910 as part of an effort to evangelize the population. Thus, we observed high levels of parent efficacy and active behavior at baseline, leading to what we believe were ceiling effects, at least for the purposes of our survey. In turn, estimated effects of treatment were likely conservative for this study.

Our target subject population was adult caregivers (following local usage, we refer to as `parents' throughout this paper) of grade 3 public school children. We chose grade 3 in consultation with our partner as a critical age during which children are attaining important and observable learning skills, and it is an age when active parental involvement is likely to be consequential. Additionally, it is not a grade in which students take national standardized exams, so we would not expect extra attention from teachers and head teachers for these students. Based on practice meetings conducted in public schools in Dar es Salaam during summer 2015, we concluded that a meeting size of approximately 25 parents would be optimal. 
%While the cost effectiveness of the intervention depends on the number of parents that can be treated simultaneously, it is also important to design meetings such that everyone has opportunities to participate. Moreover, for the study, it is important to be able to enumerate all participants, which is both costly and time-consuming. We also surmised that an intervention of four meetings would provide enough repetition and reinforcement to ensure that all participants were ``treated'' by the conclusion of the study.

Given those constraints, and based on cost and logistical concerns, we calculated that we could study 8 schools and the communities they serve (together, we refer to these units as ``school communities'') in each of the three treatment arms, for a total of \Sexpr{length(unique(studyBuk$SchoolID))} school communities. Using the 2014 primary school data publicly available on the Tanzania Open Data platform\footnote{\url{http://www.opendata.go.tz/}}, we first subsetted down to 136 Bukoba rural, public schools. Next, given that the average ranking of these schools is 7473.68 (slightly better than the national average of 7933.75), we then subsetted down to 61 schools ranking below this district average. As this intervention is not intended for already high performing schools, and we wanted to identify schools for which we could credibly inform parents that their schools needed improvement. We avoided the lowest performing schools under the assumption that there might be unobserved constraints on performance on such schools, making the effects of our treatment unlikely.
% It is important to note that we self-consciously did not carry out any power analyses to calculate the sample size needed to detect minimal effect sizes. Indeed, a central goal of this phase 1 study was to obtain the information necessary to carry out power analysis for future studies.


\begin{figure}[H]
\singlespacing
\centering
\begin{tikzpicture}[
  scale=1,
  start chain=1 going below,
	start chain=2 going right,
	node distance=1mm,
	desc/.style={
		scale=0.75,
		on chain=2,
		rectangle,
		rounded corners,
		draw=black,
		very thick,
		text centered,
		text width=5cm,
		minimum height=12mm,
		fill=gray!30
		},
	it/.style={
		fill=gray!10
	},
	level/.style={
		scale=0.75,
		on chain=1,
		minimum height=12mm,
		text width=2cm,
		text centered
	},
	every node/.style={font=\sffamily}
]

% Levels
\node [level] (Level 1) {Meeting 1};
\node [level] (Level 2) {Meeting 2};
\node [level] (Level 3) {Meeting 3};
\node [level] (Level 4) {Meeting 4};

% Descriptions
\chainin (Level 1);
\node [desc] {Information};
\node [desc, it] {Visual Evidence};
\node [desc, it] {Resource Vote (immediate outcome)};
\chainin (Level 2);
\node [desc] {Information};
\node [desc, it] {Visual Evidence};
\node [desc, it] {Resource Vote (outcome during tour)};
\node [desc, it] {School Tour};
\chainin (Level 3);
\node [desc] {Information};
\node [desc, it] {Visual Evidence};
\node [desc, it] {Resource Vote (outcome in meeting 4)};
\chainin (Level 4);
\node [desc] {Information};
\node [desc, it] {Visual Evidence};
\node [desc, it] {Peer Validation Exercise};
\end{tikzpicture}
\caption{Implementation of Validated Participation meetings. For example, Meeting 1 consists of three modules: the Information intervention, the first Visual Evidence exercise, and the first Resource Vote exercise. Each meeting was approximately 90 minutes.}
\label{fig:implementation_Buk}
\end{figure}

From this list of schools\footnote{We do not share school names or disaggregated data on schools to maintain anonymity}, we used the {\tt R} package blockTools \citep{blocktools} to match triplets of schools based on pupil/teacher ratio, rank, change in rank from previous year, enrollment, and distance in kilometers from the main urban center, Bukoba town. We took the eight best triplet matches based on smallest mahalanobis distances (for \Sexpr{length(unique(studyBuk$SchoolID))} school communities in total). Within each triplet match, we randomly assigned each school community to one of three study arms: VP, IW, and SO. 

The head teacher of each school community was asked for permission and informed of the District Education Officer's approval of the project to carry out the study and in all cases, this was granted. We asked the head teacher to provide us with a list of grade 3 students. From this list, we randomly selected 30 and invited their parents to a meeting regarding education on a given day. We arranged to have our enumeration teams conduct a lottery, stratified by gender, to select only 25 parents in the cases where more showed up. At the end of the study, each parent was given 5,000 TZS (equivalent to about 2USD) as a small token of appreciation and to offset any transportation costs.

For VP schools, Figure \ref{fig:implementation_Buk} shows the implementation of VP components across the four meetings.

<<efficacyimbalance_Buk, eval=TRUE, echo = FALSE, tidy=TRUE, fig.width = 8, fig.height = 3, out.width= "1\\linewidth", fig.pos = 't', fig.align='center', warning=FALSE, message=FALSE, fig.cap="The first plot shows that ESES was unbalanced at baseline with IW parents reported lower efficacy than SO and VP parents reported higher efficacy than IW prior to the interventions. We use covariate balancing propensity score (CBPS) to generate weights for each parent, matched based on baseline ESES. The second plot shows the predicted difference-in-means once we use these weights.">>=

#Show the balance of education efficacy across treatment groups:
EFFB <- c("EEFscore_B", "EEFinternal_B", "EEFexternal_B", "EEFindiv_B", "EEFgroup_B")

EEFBplot <- as.matrix(rep(NA, 0))
  
for(i in 1:length(EFFB)){
  
  studyBuk$var <- studyBuk[, c(EFFB[i])]
  
  fit <- lm(var ~ VP + IW + factor(Match), 
              data = studyBuk)
  
  fit2 <- clm(studyBuk, fit, studyBuk$SchoolID)
  
  fitpp <- fitpred(fit, fit2, modeltype = "lm")
  
  fitpp$covar <- EFFB[i]
  
  EEFBplot <- rbind(EEFBplot, fitpp[4:6,])
  
}

EEFBplot$V6 <- rep(1:3)

EEFBplot[,-(5:7)] <- as.data.frame(lapply(EEFBplot[,-(5:7)], function(x) as.numeric(as.character(x))))

pd <- position_dodge(0.5) # move them .05 to the left and right

EEFB.plot <- ggplot(EEFBplot, aes(x = covar, y = V1, shape = V5, group = V5)) + 
  geom_point(position=pd, size=2) +
  geom_errorbar(aes(ymin = as.numeric(as.character(V3)), 
                    ymax = as.numeric(as.character(V4))), 
                width = 0, size = .4, position = pd) +
  geom_hline(aes(yintercept=0), linetype = "dashed") +
  scale_x_discrete(breaks=c(unique(EEFBplot$covar)),
                            labels=c("Efficacy Score", "Internal Efficacy", 
                            "External Efficacy", "Individual Efficacy", "Group Efficacy")) +
  ylab("Difference in predicted means, \n Full Sample unweighted") +
  xlab("") +
  ylim(-.5, .5) +
  theme(panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        #legend.justification = c(1, 1), 
        #legend.position= c(.99, .99),
        #legend.key = element_rect(colour = "transparent", fill = "white"),
        legend.position = "none") +
  coord_flip() 

#Show the balance of education efficacy across treatment groups for SUB SAMPLE:
EFFB <- c("EEFscore_B", "EEFinternal_B", "EEFexternal_B", "EEFindiv_B", "EEFgroup_B")

EEFBplotsub <- as.matrix(rep(NA, 0))
  
for(i in 1:length(EFFB)){
  
  studyBuksub$var <- studyBuksub[, c(EFFB[i])]
  
  fit <- lm(var ~ VP + IW + factor(Match), 
              data = studyBuksub)
  
  fit2 <- clm(studyBuksub, fit, studyBuksub$SchoolID)
  
  fitpp <- fitpred(fit, fit2, modeltype = "lm")
  
  fitpp$covar <- EFFB[i]
  
  EEFBplotsub <- rbind(EEFBplotsub, fitpp[4:6,])
  
}

EEFBplotsub$V6 <- rep(1:3)

EEFBplotsub[,-(5:7)] <- as.data.frame(lapply(EEFBplotsub[,-(5:7)], function(x) as.numeric(as.character(x))))

pd <- position_dodge(0.5) # move them .05 to the left and right

EEFB.plotsub <- ggplot(EEFBplotsub, aes(x = covar, y = V1, shape = V5, group = V5)) + 
  geom_point(position=pd, size=2) +
  geom_errorbar(aes(ymin = as.numeric(as.character(V3)), 
                    ymax = as.numeric(as.character(V4))), 
                width = 0, size = .4, position = pd) +
  geom_hline(aes(yintercept=0), linetype = "dashed") +
  scale_x_discrete(breaks=c(unique(EEFBplotsub$covar)),
                   labels=c("Efficacy Score", "Internal Efficacy", 
                            "External Efficacy", "Individual Efficacy", "Group Efficacy")) +
  ylab("Difference in predicted means, Lower Baseline Efficacy (< 4) sub-Sample") +
  xlab("") +
  ylim(-.5, .5) +
  theme(panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.justification = c(1, 1), legend.position= c(.99, .99)) +
  coord_flip() 

#Show the balance of education efficacy across treatment groups with CBPS weights:
EFFB <- c("EEFscore_B", "EEFinternal_B", "EEFexternal_B", "EEFindiv_B", "EEFgroup_B")

EEFBplotw <- as.matrix(rep(NA, 0))
  
for(i in 1:length(EFFB)){
  
  studyBuk$var <- studyBuk[, c(EFFB[i])]
  
  fit <- lm(var ~ VP + IW + factor(Match), 
              data = studyBuk, weights = cbpsweights)
  
  fit2 <- clm(studyBuk, fit, studyBuk$SchoolID)
  
  fitpp <- fitpred(fit, fit2, modeltype = "lm")
  
  fitpp$covar <- EFFB[i]
  
  EEFBplotw <- rbind(EEFBplotw, fitpp[4:6,])
  
}

EEFBplotw$V6 <- rep(1:3)

EEFBplotw[,-(5:7)] <- as.data.frame(lapply(EEFBplotw[,-(5:7)], function(x) as.numeric(as.character(x))))

pd <- position_dodge(0.5) # move them .05 to the left and right

EEFB.plotw <- ggplot(EEFBplotw, aes(x = covar, y = V1, shape = V5, group = V5)) + 
  geom_point(position=pd, size=2) +
  geom_errorbar(aes(ymin = as.numeric(as.character(V3)), 
                    ymax = as.numeric(as.character(V4))), 
                width = 0, size = .4, position = pd) +
  geom_hline(aes(yintercept=0), linetype = "dashed") +
  scale_x_discrete(breaks=c(unique(EEFBplotw$covar)),
                   labels=c("Efficacy Score", "Internal Efficacy", 
                            "External Efficacy", "Individual Efficacy", "Group Efficacy")) +
  ylab("Difference in predicted means, \n Full Sample weighted") +
  xlab("") +
  ylim(-.5, .5) +
  theme(panel.background = element_blank(),
        legend.title = element_blank(),
        legend.key = element_rect(colour = "transparent", fill = "white"),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.justification = c(1, 1), legend.position= c(.99, .99)) +
  coord_flip() 

grid.arrange(EEFB.plot, EEFB.plotw, ncol = 2)

@

Despite block randomization at the school level using school-level variables, the number of school units is relatively small, and across treatment groups we do find individual-level differences that are significant at the 90 percent confidence level. Individual-level variables for parents at each of the study schools were not available to us before the baseline on which we could block randomize. We do find significant baseline differences on our key outcome of interest, Educational Self-Efficacy Scale, thus we generate weights for each parent, down-weighting those parents whose baseline ESES scores contributed to imbalance. Figure \ref{fig:efficacyimbalance_Buk} shows that parents randomly assigned to the IW treatment arm reported lower efficacy at baseline than those assigned to SO, and parents assigned to the VP arm reported higher efficacy than those assigned to IW prior to the interventions; thus, IW parents may have had more room to increase their sense of efficacy while VP parents may have encountered ceiling effects. Such important imbalances would weigh heavily against valid interpretation of naive (unadjusted) experimental results \citep{Abadie:2005}. Thus we correct for these statistically by using the {\tt R} package covariate balancing propensity score (CBPS) to generate weights for each parent, down-weighting those parents whose baseline scores contributed to imbalance at baseline \citep{Fong:2014}. The second plot shows the predicted difference-in-means once we use these weights, lending credibility to this approach as a reasonable correction.

% BUKOBA COVARIATE EQUIVALENCE TEST
<<Equivalence_Buk, eval=TRUE, echo = FALSE, tidy=TRUE, fig.pos='H', fig.width = 6, fig.height = 4, fig.align='center', out.width = '.9\\maxwidth', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="This figure shows the equivalence tests for the treatments across demographic covariates for Study 1. The covariates for which the null hypothesis of statistical difference was not rejected are SES index, Parent vs. Caregiver, Muslim, and Education level.">>=

#Test equivalence across treatment groups:
covars <- c("HH1_B", "DM1_B", "BC5_B_num", 
             "econindexSUM_B", "CH1_B",
             "Female_B","HHhead_B", "literate_B",  
             "muslim_B", "political_B", "parent_B", 
             "disabilities_B_bi", "SC2_B_bi")

descriptlabels <-  c("Household Size", "Age", 
                     "Education Level", 
                     "SES Index", "No. of Children",
                     "Female", "Household Head", 
                     "Literate", "Muslim", "Political", 
                     "Parent (vs. Caregiver)", 
                     "Child w. Disabilities", 
                     "On School Committee")

coveqvs <- coveqvs.se <- coveqvs.L <- 
  coveqvs.U <- covpvalue <- covresult <-
  covar <- as.matrix(rep(NA, 0))

for(i in 1:length(covars)){
  
   eqvs <- eqvs.se <- eqvs.L <- eqvs.U <- eqvs.pval <- eqvs.result <- as.matrix(rep(NA, 3))
   
   ## Get data
   Controlcov <- studyBuk[studyBuk$VP == 0 & studyBuk$IW == 0,c(covars[i])]
   VPcov <- studyBuk[studyBuk$VP == 1 & studyBuk$IW == 0,c(covars[i])]
   IWcov <- studyBuk[studyBuk$VP == 0 & studyBuk$IW == 1,c(covars[i])]
   
   #TOST with magnitude of region of similarity as .2 * sd
   tost1 <- tost(VPcov, Controlcov, epsilon = .36*sd(studyBuk[, c(covars[i])], na.rm = T), 
                 conf.level = .9) 
   tost2 <- tost(IWcov, Controlcov, epsilon = .36*sd(studyBuk[, c(covars[i])], na.rm = T), 
                 conf.level = .9)
   tost3 <- tost(VPcov, IWcov, epsilon = .36*sd(studyBuk[, c(covars[i])], na.rm = T),
                 conf.level = .9)
   
   eqvs[1] <- tost1$estimate[1] - tost1$estimate[2] 
   eqvs[2] <- tost2$estimate[1] - tost2$estimate[2] 
   eqvs[3] <- tost3$estimate[1] - tost3$estimate[2] 
   
   eqvs.se[1] <- tost1$se.diff
   eqvs.se[2] <- tost2$se.diff
   eqvs.se[3] <- tost3$se.diff

   eqvs.L[1] <- tost1$tost.interval[1]
   eqvs.L[2] <- tost2$tost.interval[1]
   eqvs.L[3] <- tost3$tost.interval[1]
   
   eqvs.U[1] <- tost1$tost.interval[2]
   eqvs.U[2] <- tost2$tost.interval[2]
   eqvs.U[3] <- tost3$tost.interval[2]

   eqvs.pval[1] <- tost1$tost.p.value
   eqvs.pval[2] <- tost2$tost.p.value
   eqvs.pval[3] <- tost3$tost.p.value
   
   eqvs.result[1] <- tost1$result
   eqvs.result[2] <- tost2$result
   eqvs.result[3] <- tost3$result
   
   coveqvs <- c(coveqvs, eqvs)
   coveqvs.se <- c(coveqvs.se, eqvs.se)
   coveqvs.L <- c(coveqvs.L, eqvs.L)
   coveqvs.U <- c(coveqvs.U, eqvs.U)
   covpvalue <- c(covpvalue, eqvs.pval)
   covresult <- c(covresult, eqvs.result)
   covar <- c(covar, rep(descriptlabels[i], 3))
}

eqvplot <- as.data.frame(cbind(
           coveqvs = coveqvs,
           coveqvs.se = coveqvs.se,
           coveqvs.L = coveqvs.L,
           coveqvs.U = coveqvs.U,
           covpvalue = covpvalue,
           nulldiff = covresult,
           estimate = c(rep(c("VP - SO", 
                              "IW - SO",
                              "VP - IW"), 
                           length(covars))),
           covar = covar
            ))

eqvplot[,-(6:8)] <- as.data.frame(lapply(eqvplot[,-(6:8)], function(x) as.numeric(as.character(x))))

pd <- position_dodge(0.5) # move them .05 to the left and right
  
Eqvplot1 <- ggplot(eqvplot, 
       aes(x = covar, y = coveqvs, shape = estimate, group = estimate, colour = nulldiff)) + 
    geom_point(position=pd, size=3) +
  geom_errorbar(aes(ymin = as.numeric(as.character(coveqvs.L)), 
                    ymax = as.numeric(as.character(coveqvs.U))), 
                width = 0, size = .7, position = pd) +
  scale_colour_manual(values = c("#FF0000", "#000000")) +
  ggtitle("Equivalence Tests of Covariates
Hypothesized Epsilon: 0.36*sd   |  Alpha: 0.1"
          ) +
  theme(plot.title = element_text(hjust=-.08)) +
  ylab("Difference in means by Treatments") +
  xlab("") +
  #ylim(-.6, .6) + 
  geom_hline(aes(yintercept=0), lty="dashed", colour = "gray") +
  coord_flip() +
  theme_bw() +
  theme(panel.grid.major = element_blank(), 
  axis.line = element_line(colour = "black"))

Eqvplot1

@

Using equivalence tests in lieu of less conservative balance tests \citep{Hartman:2018}, Figure \ref{fig:Equivalence_Buk} shows that the null hypothesis of statistical difference was not rejected for the following covariates: SES index, Parent vs. Caregiver, Muslim, and Education level. With such a small sample size and randomization at the school level, rather than parent level, we expected that some covariates would not be balanced. We adjust for all covariates in the analyses. 


% \newpage
% \section{Study 2 Results: Effects on Parent-Level Outcomes}
% \label{sec:SIbukobaresults}



\newpage
\section{Study 2 Kilosa Implementation Plan}
\label{sec:SIkilosaplan}

For the Kilosa study, we again evaluated the effects of the Validated Participation (VP) protocol. Using data from OpenData and Uwezo (a Tanzanian NGO focused on education and a partner of Twaweza), in consultation with Twaweza, we selected Kilosa (Morogoro) for our study site. Kilosa District is one of the six districts of the Morogoro Region of Tanzania. Its administrative seat is the town of Kilosa. Kilosa District covers 14,918 square kilometres (5,760 sq mi). According to the 2012 Tanzania National Census, the population of the Kilosa District is 438,175.\footnote{\url{http://www.tzdpg.or.tz/fileadmin/documents/dpg_internal/dpg_working_groups_clusters/cluster_2/water/WSDP/Background_information/2012_Census_General_Report.pdf}}.

While Study 1 provided solid evidence of the plausibility of the theory, as anticipated, the strength of evidence in this study was limited, and we sought additional evidence that would be useful both for testing the overall theory of change, and for gathering information that would be useful from a cost effectiveness standpoint for implementation by organizations in the future. In Bukoba, we tested our novel intervention as a series of four meetings that we hypothesized would lead parents to feel a heightened sense of efficacy, and in turn to actively promote the education of their children at home and at school. While the content of the intervention was largely the same for the Kilosa study, in the latter, the intervention was conducted as a ``single dose'' in one day. We made this change for research and policy-related purposes -- one meeting is less costly and logistically easier than four. However, we recognized that without the reinforcement of additional meetings, the impact might be more limited.

A second key difference from our prior study, in which we assigned treatment at the school level, was that in this study, we randomized at the individual-level within schools, and we planned for a much larger sample of subjects. For this study we chose a district in central Tanzania, Kilosa in Morogoro region to increase external validity and to addresses some of the ``ceiling effects'' from the prior study (discussed below). 

In addition, we designed this study to immediately observe behavioral and behavior-related outcomes that should theoretically follow a boost in efficacy: specifically, a greater willingness to ask questions and to engage with authority figures at a meeting with a classroom teacher, and a greater desire to offer suggestions for how the school might improve. In the wake of a series of studies about information and behavior, our study provides a unique opportunity to observe whether behavior change is possible immediately following an intervention. While we recognize that the somewhat artificial setting of our study might have led some to behave in ways that are different from what would be observed in a purely natural setting, this should not have varied across treatment group. Importantly, we set up a ``likely'' test for a behavioral impact in the sense that subjects were provided a relatively low cost opportunity to take action directly after an intervention that ought to encourage participation. 

Figure \ref{fig:power} shows the power analysis for this study. For an effect size of .1, which is similar to what we obtained from the Phase 1 study, with a power of .8,  we aimed for 500 parents per treatment group or 1500 parents total. From the Bukoba study, we determined that no more than 25 participants was ideal for the VP activities -- a sufficiently small group that would allow parents to engage in a lively discussion, with opportunities for every parent to speak up. 
% Thus, if we have about 15-20 participants per treatment arm, then in a single session we would have 45-60 parents. We planned to conduct two sessions (morning and afternoon) per school. 

\begin{figure}
  \centering
  \includegraphics[width=.6\linewidth]{figure_inputs/OneShotpower.png}
  \caption{Power analysis for Single Dose study.}
  \label{fig:power}
\end{figure}

Within Kilosa, we selected 1 pilot school and 16 study schools randomly, conditional that their national rank and pass rates were in the 26-50 percentile. Two weeks prior to the study, an EDI staff member conducted pre-visits to each of these schools to speak with the head teacher to make sure that the schools were accessible. This staff member asked for permission and informed the head teachers of the District Education Officer's approval of the project to carry out the study and in all cases, this was granted. We asked the head teachers to send out invitation letters to the parents in grades 2, 3, 4, and/or 5 (depending on how large the grades are, we aimed to get a total of 90-120 parents in total). 
Parents were asked to send back a confirmation slip of their participation with their gender marked so that we could try to achieve a mix of genders in each session. 

On the date and time of their session, upon arrival, parents were greeted by the enumeration team, who carried out the screening and consent process to make sure that all potential subjects were over 18 years of age, a parent/primary caregiver to a child attending the school, and that they consented to participation in the study. At that point, the parents were randomly assigned, blocked by gender, to one of the three treatment arms -- VP, IW, and SO, each taking place in a different classroom on the school grounds. We did not exclude any eligible parent, so if there were more than 60 parents or less than 45 parents per session, we still conducted the session.\footnote{We learned from the Phase 1 study that conducting a lottery so that we would only have 25 parents exactly per school (the treatments were at the school level) may have led to unforeseen dynamics of social desirability for the parents who 'won' the lottery. So for this study, we decided not to conduct another lottery.}

\begin{figure}
  \centering
  \includegraphics[width=1\linewidth]{figure_inputs/OneShotsession.png}
  \caption{Kilosa meeting session schedule overview.}
  \label{fig:session}
\end{figure}

Figure \ref{fig:session} shows the overview of a session and which member(s) of the team conducted which activity at a given time. The ordering of activities was deliberate to ensure that measurement occurred only post-treatment in the treatment arms and without treatment in the control arm, while also disguising randomization into different treatment arms to avoid experimenter effects. Subjects were assigned to classrooms, but at the time of measurement, they were not aware that the sequence of activities was different depending on classroom assignment.

Measurement consisted of a 15 minute survey, a group meeting in a classroom, and optional Office Hours with the Head Teacher. The SO (control) group only engaged in the measurement exercise. The IW and VP treatment groups both participated in an information module, including a 24 minute video, the contents of which were clips collected from HakiElimu\footnote{\url{http://hakielimu.org/}}, which worked with Twaweza to create this content, as well as Minibuzz Tanzania\footnote{\url{http://miatv.co/miatv/minibuzz/}}, a talkshow that discusses current issues with citizens. Together these clips showed 1) issues with education in Tanzania such as overcrowded classrooms and insufficient resources, 2) citizens discussing the role that parents can play in their children's education, and 3) interviews with Twaweza staff members on these issues. For the IW treatment, the meeting facilitator simply showed this video prior to measurement. For the VP treatment, the meeting facilitator showed this video \emph{and} conducted the VP activities prior to measurement.

The field team consisted of all Tanzanian staff members, two supervisors, a data processing officer, 10 enumerators, and two facilitators -- one male and one female. The two facilitators were rotated across sessions as the VP facilitator and the Logistical Assistant to ensure against detecting merely a ``facilitator effect.'' Figure \ref{fig:session} shows how the staffing was purposely staggered throughout the session, which was designed so parents would not spend too much time waiting.

In practice, one limitation of our design was that the VP group experienced a longer session than the other groups. We contemplated giving the SO group a placebo video to control for the session time, however, given the added logistical burdens and staffing costs that would have implied, as well as the challenge of identifying a placebo that would clearly have no effects but also would be appropriate in the context, we opted against this. Our choice likely biased against finding a treatment effect because if anything, treated parents were more likely to be fatigued by the end of the session. 

At the end of the session, each parent was given 3,000 TZS (equivalent to about 1.5USD) as a small token of appreciation and to offset any transportation costs. We intentionally did not include any behavioral measures asking parents to 'pay' or 'contribute' to anything, which in the past we found to be a noisy measure, and determined that it was unfair to parents to be promised a token only to give them potentially socially desirable opportunities to spend it during the course of the study.

We note a few important differences between our prior Phase 1 study and this ``single dose'' study. These revisions aimed to bring greater efficiency to the study, to test whether similar effects might be found with less effort (implying less burdensome policy prescriptions should the findings be conclusive and positive), and to maintain a more controlled (but still naturalistic) setting. 

\begin{enumerate}
\setlength{\itemsep}{-5pt}
\item In our prior study, the ``dose'' of treatment was delivered over 4 meetings; here we studied our intervention as a ``single dose''  in one day. 
\item Rather than randomization and treatment status occurring at the school level, in this study we randomized at the individual-level within schools to gain efficiency, and all measurements were taken in a single day, immediately following the delivery of the interventions, thus decreasing the possibility of spillovers within schools across treatment arms. 
\item We did not have an exclusion lottery.
\item We did not limit to only Standard 3 parents, instead inviting parents from standards 2 – 5, depending on the number of parents in each standard. We aimed for about 45-60 parents in each study session, meaning 90-120 parents per school since there will be two sessions in each school.
\item For the information portion of the Validated Participation and Information Workshop groups, instead of facilitators giving informational lectures, we showed an informational video.
\end{enumerate}

Since the intervention and measurement occurred all in one day for this study, we did not conduct a baseline and endline. While such a move requires that we estimate effects between-subjects rather than within-subjects -- generally thought to be a less preferable strategy -- we believe that this approach likely offered some benefits because questions asked on a baseline survey can affect how respondents answer questions on the endline survey especially if the timeframe between the two is short. 

We also did not measure student learning outcomes in this study. While student learning is ultimately a critical outcome, it is not the focus of this study. Our main outcomes of interest in this study were beliefs of self-efficacy and pro-development citizen behaviors, namely parent participation in education. Furthermore, it would not make sense to expect and to measure student outcomes the day of the meeting, since it is downstream from parent efficacy and behavior change. But since this research design relies on randomizing between parents \textit{within} schools, if we measured student outcomes later, we also could not prevent spillover effects between parents of the same school. Instead, we focused on measuring self-efficacy beliefs, attitudes about the importance of parental participation in education, reflections on the extent of respectful or dignified treatment received, and behavioral measures of participation. 

% KILOSA COVARIATE EQUIVALENCE TEST
<<Equivalence_Kil, eval=TRUE, echo = FALSE, tidy=TRUE, fig.pos='H', fig.width = 6, fig.height = 4, fig.align='center', out.width = '.9\\maxwidth', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="This figure shows the equivalence tests for the treatments across demographic covariates for the Kilosa study. For all covariates, the null hypothesis of statistical difference was rejected.">>=

#Test equivalence across treatment groups:
covars <- c("hh_size", "age", "Education_num", 
            "econindexSUM", "Children",
            "Female","HHhead", "Literate",  
            "Muslim", "Political", 
            "Parent", "SCmember")

descriptlabels <-  c("Household Size", 
                     "Age", 
                     "Education Level", 
                     "SES Index", 
                     "No. of Children",
                     "Female", 
                     "Household Head", 
                     "Literate", 
                     "Muslim", 
                     "Political", 
                     "Parent (vs. Caregiver)", 
                     "On School Committee")

coveqvs <- coveqvs.se <- coveqvs.L <- 
  coveqvs.U <- covpvalue <- covresult <-
  covar <- as.matrix(rep(NA, 0))

for(i in 1:length(covars)){
  
   eqvs <- eqvs.se <- eqvs.L <- eqvs.U <- eqvs.pval <- eqvs.result <- as.matrix(rep(NA, 3))
   
   ## Get data
   Controlcov <- studyKil[studyKil$VP == 0 & studyKil$IW == 0,c(covars[i])]
   VPcov <- studyKil[studyKil$VP == 1 & studyKil$IW == 0,c(covars[i])]
   IWcov <- studyKil[studyKil$VP == 0 & studyKil$IW == 1,c(covars[i])]
   
   #TOST with magnitude of region of similarity as .2 * sd
   tost1 <- tost(VPcov, Controlcov, epsilon = .36*sd(studyKil[, c(covars[i])], na.rm = T), 
                 conf.level = .9) 
   tost2 <- tost(IWcov, Controlcov, epsilon = .36*sd(studyKil[, c(covars[i])], na.rm = T), 
                 conf.level = .9)
   tost3 <- tost(VPcov, IWcov, epsilon = .36*sd(studyKil[, c(covars[i])], na.rm = T),
                 conf.level = .9)
   
   eqvs[1] <- tost1$estimate[1] - tost1$estimate[2] 
   eqvs[2] <- tost2$estimate[1] - tost2$estimate[2] 
   eqvs[3] <- tost3$estimate[1] - tost3$estimate[2] 
   
   eqvs.se[1] <- tost1$se.diff
   eqvs.se[2] <- tost2$se.diff
   eqvs.se[3] <- tost3$se.diff

   eqvs.L[1] <- tost1$tost.interval[1]
   eqvs.L[2] <- tost2$tost.interval[1]
   eqvs.L[3] <- tost3$tost.interval[1]
   
   eqvs.U[1] <- tost1$tost.interval[2]
   eqvs.U[2] <- tost2$tost.interval[2]
   eqvs.U[3] <- tost3$tost.interval[2]

   eqvs.pval[1] <- tost1$tost.p.value
   eqvs.pval[2] <- tost2$tost.p.value
   eqvs.pval[3] <- tost3$tost.p.value
   
   eqvs.result[1] <- tost1$result
   eqvs.result[2] <- tost2$result
   eqvs.result[3] <- tost3$result
   
   coveqvs <- c(coveqvs, eqvs)
   coveqvs.se <- c(coveqvs.se, eqvs.se)
   coveqvs.L <- c(coveqvs.L, eqvs.L)
   coveqvs.U <- c(coveqvs.U, eqvs.U)
   covpvalue <- c(covpvalue, eqvs.pval)
   covresult <- c(covresult, eqvs.result)
   covar <- c(covar, rep(descriptlabels[i], 3))
}

eqvplot <- as.data.frame(cbind(
           coveqvs = coveqvs,
           coveqvs.se = coveqvs.se,
           coveqvs.L = coveqvs.L,
           coveqvs.U = coveqvs.U,
           covpvalue = covpvalue,
           nulldiff = covresult,
           estimate = c(rep(c("VP - SO", 
                              "IW - SO",
                              "VP - IW"), 
                           length(covars))),
           covar = covar
            ))

eqvplot[,-(6:8)] <- as.data.frame(lapply(eqvplot[,-(6:8)], function(x) as.numeric(as.character(x))))

pd <- position_dodge(0.5) # move them .05 to the left and right
  
Eqvplot2 <- ggplot(eqvplot, 
       aes(x = covar, y = coveqvs, shape = estimate, group = estimate, colour = nulldiff)) + 
    geom_point(position=pd, size=3) +
  geom_errorbar(aes(ymin = as.numeric(as.character(coveqvs.L)), 
                    ymax = as.numeric(as.character(coveqvs.U))), 
                width = 0, size = .7, position = pd) +
  scale_colour_manual(values = c("#000000")) +
  ggtitle("Equivalence Tests of Covariates
Hypothesized Epsilon: 0.36*sd   |  Alpha: 0.1"
          ) +
  theme(plot.title = element_text(hjust=-.08)) +
  ylab("Difference in means by Treatments") +
  xlab("") +
  #ylim(-.6, .6) + 
  geom_hline(aes(yintercept=0), lty="dashed", colour = "gray") +
  coord_flip() +
  theme_bw() +
  theme(panel.grid.major = element_blank(), 
  axis.line = element_line(colour = "black"))

Eqvplot2

@

Figure \ref{fig:Equivalence_Kil} shows that the null hypothesis of statistical difference was rejected for all covariates. Given the larger sample size for this study and that randomization occured at the parent level, we expect the covariates to be balanced across treatment groups. Nevertheless, we adjust for all covariates in the analyses. 


\newpage
\section{Risk and Ethical Considerations}
\label{sec:SIethics}

The central motivation for this study was to better understand how to elicit a set of outcomes we believe to be intrinsically beneficial for our research subjects and for society more generally: more pro-development attitudes (perceptions of efficacy) and behaviors among citizens who are frequently excluded from democratic practice; and to increase engagement, oversight, and quality of education for primary school children. That said, not only do many well-intentioned projects fail to do good, they may do harm. It is important for researchers to consider this possibility. 

Although we assessed the likely risk of harm to humans as being very low in this study, we believe that social scientists may be under-emphasizing some of the costs and potential adverse effects caused by social research. In this section, we detail a few such concerns anticipated prior to conducting the research.

Since this intervention did not seek to make structural changes within the education system - such as bringing in new administrators or challenging the school budgeting procedures already in place - our post-treatment parents likely encountered the same systemic barriers to change that they did before the onset of the study. A concern with the proposed experiment was that when facing these barriers, post-treatment parents may feel even lower feelings of efficacy. Giving information and simulating opportunities to engage may only cause increased awareness of bureaucratic and political unresponsiveness.

To be clear, our intervention protocol never delivered a message to parents that they \textit{will} be successful. \textit{Validated Participation} activities simply provided opportunities for them to feel efficacious by showing them that they are \textit{capable} of making inferences and decisions for their children's education. We neither ``rigged'' the votes in Resource Vote nor engaged in any deception. Thus, while it is possible our participants may feel discouraged if and when the actual system fails them, this is no different from any other project in which the failure to meet raised expectations might generate some frustration. For example, this concern also brings to mind \textit{informed disenchantment} from \citet{Gallagher:2006}, in which Chinese plaintiffs felt both increased levels of competency and disappointment in the system's fairness upon actively engaging with the legal system.\footnote{Similarly, \citet{Soboleva:2019} finds in Eastern Ukraine that cognitive therapy and civic education improved efficacy but also suppressed civic engagement.} Nevertheless, rather than becoming despondent, these citizens channeled their disenchantment into more critical and informed action by educating their friends and family members and finding creative ways to mobilize. We hope that the subjects in our study would react similarly. We view this risk as minimal.

Having identified these possible areas of concern, we conducted several pilot studies near Dar es Salaam and in Bukoba to monitor for potential harm. Additionally, after this study, we looked for any evidence of possible to harm to human subjects through analysis of both our quantitative data (i.e., through discovery of adverse effects of treatment) and through qualitative research conducted after the completion of the endline survey of adult participants. We found no such adverse effects.


\section{Deviations from Pre-Analysis Plans}
\label{sec:SIdeviations}

\begin{table}[H]
\begin{tabular}{|>{\raggedright\arraybackslash}p{2cm}|>{\raggedright\arraybackslash}p{2cm}|>{\raggedright\arraybackslash}p{4cm}|>{\raggedright\arraybackslash}p{8cm}|}
\hline
\textbf{Plan (page)}    & \textbf{Study}  & \textbf{Deviation} & \textbf{Reason}   \\ \hline
April 26, 2016, Phase 1 PAP, p16 & 
Study 1 Bukoba & 
We do not analyze the Family Tree project as a measure of parental participation or for spillovers. & 
While we included instructions for this assignment, teachers offered different instructions across the study schools for how to complete this project and how long students had to turn it in. Thus, we were not able to attribute differences across the schools to our treatments, and so we were not able to use this measure. 
\\ \hline
April 26, 2016, Phase 1 PAP, p16 &
Study 1 Bukoba &  
We do not analyze attendance records as a measure of child learning habits or for spillovers. &
We could not attain sufficient records to complete this analysis.
\\ \hline
August 1, 2018 Phase 1 PAP update, p21-23 &   
Study 1 Bukoba &
We noted support for key hypotheses based on Phase 1 study, but report these in final article as null results. & 
In our PAP, we specified in Eq. 1 a model in which we would estimate models with change scores $\Delta y_{i,j}$ as our main outcome. But we learned that best practice is to control for pre-treatment outcomes for more precise estimates.\footnote{See \url{https://declaredesign.org/blog/2019-01-15-change-scores.html}.} Rerunning our models with this alternate specification has changed our results from when we wrote this PAP. 
\\ \hline
August 1, 2018 Phase 1 PAP update, p24 &
Bukoba Qualitative Follow-up &
We said we would code all variables on a 0-1 scale, but we coded on a 3-point scale for frequency and change outcomes. &
We assumed that the responses would be Yes/No re:parental involvement and None/Positive re:change. However, we found that numerous responses made distinctions between some or multiple instances of parental involvement (frequency), and the situation getting worse relative to baseline (change), necessitating a separate coding category. However, we also analyze the data with binary outcomes and find no substantive difference in the results. See SI Section \ref{sec:SIQual2results_binary}.
\\ \hline
June 16, 2018, Phase 2 PAP, p54 &
Study 2 Kilosa &
We do not analyze as outcomes meetings with classroom teachers and office hours with head teacher. &
Since parents in the VP treatment arm had the opportunity to talk and engage a teacher-like authority during the intervention, they said they felt no need to speak further with school officials immediately after the long intervention. This was a design flaw on our part, and rendered the test invalid. 
\\ \hline
\end{tabular}
\caption{This table logs deviations from our pre-analysis plans.}
\label{tab:deviations}
\end{table}


\newpage
\section{Association between Active Citizenship and Educational versus General Self-Efficacy}
\label{sec:SIEEF2}

<<EEFplot2, eval=TRUE, echo = FALSE, tidy=TRUE, fig.width = 10, fig.height = 9, out.width= ".8\\linewidth", fig.pos = 'H', fig.align='center', warning=FALSE, message=FALSE, fig.cap="Positive linear relationships between our educational self-efficacy score (x-axis, blue) and pro-development outcomes (y-axis) from both studies, compared with the general self-efficacy score (x-axis, gray). From Study 1 (rows 1-2), these plots show the predicted probabilities for children's test scores and parental attitudinal and behavioral outcomes at baseline. From Study 2 (row 3), these plots show the predicted probabilities for pro-education political behaviors for the SO (control) parents (with 95 $\\%$ and 90$\\%$ CIs). OLS models, controlling for all demographic covariates, with school cluster robust standard errors.">>=

# Load predicted probability data from Bukoba and Kilosa studies
#setwd("Paper_Inputs")

load("../output/BukEEFbasefit.Rdata")
load("../output/BukGEFbasefit.Rdata")
load("../output/BukEconfit.Rdata")
load("../output/BukEdufit.Rdata")

load("../output/KilEEFfit.Rdata")
load("../output/KilGEFfit.Rdata")
load("../output/KilEconfit.Rdata")
load("../output/KilEdufit.Rdata")

pd <- position_dodge(0.1) # move lines 
group.colors <- c("blue", "gray40")

## Bukoba study plots
# Child's test scores 
pred.KFTotal_B <- rbind(EEFBpred.KFTotal_B,
                        GEFBpred.KFTotal_B)

EEFBplot.KFTotal_B <- ggplot(pred.KFTotal_B, 
                            aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(0, 30) +
  ylab("Predicted Test score") +
  xlab("Pre-Treatment Score") +
  ggtitle("Child's test scores (/72 pts total)") +
  annotate(geom="text", x=1.7, y=8, label="Edu Efficacy", color="blue") +
  annotate(geom="text", x=1.7, y=25, label="Gen Efficacy", color="gray40") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Knows teacher's name
pred.CCK1_B_num <- rbind(EEFBpred.CCK1_B_num,
                         GEFBpred.CCK1_B_num)

EEFBplot.CCK1_B_num <- ggplot(pred.CCK1_B_num, 
                              aes(x = EEFscore, y = est,
                              shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(0, 1) +
  ylab("Predicted Probability") +
  xlab("Pre-Treatment Score") +
  ggtitle("Knows teacher's name") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Certain graduate secondary school
pred.EQ5_B_bi <- rbind(EEFBpred.EQ5_B_bi,
                       GEFBpred.EQ5_B_bi)

EEFBplot.EQ5_B_bi <- ggplot(pred.EQ5_B_bi,
                            aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(-.27, 1) +
  ylab("Predicted Probability") +
  xlab("Pre-Treatment Score") +
  ggtitle("Believes child will finish secondary") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 11),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Asks about teacher absence
pred.EQ1_B_num <- rbind(EEFBpred.EQ1_B_num,
                        GEFBpred.EQ1_B_num)
  
EEFBplot.EQ1_B_num <- ggplot(pred.EQ1_B_num, 
                            aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) +  
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(-.2, 1) +
  ylab("Predicted Probability") +
  xlab("Pre-Treatment Score") +
  ggtitle("Asks about teacher absence") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Looked at HW last week
pred.PP2_B_num <- rbind(EEFBpred.PP2_B_num,
                        GEFBpred.PP2_B_num)

EEFBplot.PP2_B_num <- ggplot(pred.PP2_B_num, 
                            aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(0, 1) +
  ylab("Predicted Probability") +
  xlab("Pre-Treatment Score") +
  ggtitle("Looked at HW last week") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Gave child breakfast today
pred.CB1_B_num <- rbind(EEFBpred.CB1_B_num,
                        GEFBpred.CB1_B_num)

EEFBplot.CB1_B_num <- ggplot(pred.CB1_B_num, 
                            aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(0, 1) +
  ylab("Predicted Probability") +
  xlab("Pre-Treatment Score") +
  ggtitle("Gave child breakfast today") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  


## Kilosa study plots
# Respected by other parents
pred.RespectedbyParents <- rbind(EEFpred.RespectedbyParents,
                                 GEFpred.RespectedbyParents)

EEFplot.RespectedbyParents <- ggplot(pred.RespectedbyParents, 
                                     aes(x = EEFscore, y = est,
                                     shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(1, 5) +
  ylab("Predicted Response on 1 to 5 scale") +
  xlab("Control Group Score") +
  ggtitle("Respected by other parents") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Respected by authorities
pred.RespectedbyAuth <- rbind(EEFpred.RespectedbyAuth,
                              GEFpred.RespectedbyAuth)

EEFplot.RespectedbyAuth <- ggplot(pred.RespectedbyAuth, 
                                   aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(1, 5) +
  ylab("Predicted Response on 1 to 5 scale") +
  xlab("Control Group Score") +
  ggtitle("Respected by authorities") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Ideas respected by school committee
pred.RespectedIdeas <- rbind(EEFpred.RespectedIdeas,
                             GEFpred.RespectedIdeas)

EEFplot.RespectedIdeas <- ggplot(pred.RespectedIdeas, 
                                  aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(1, 5) +
  ylab("Predicted Response on 1 to 5 scale") +
  xlab("Control Group Score") +
  ggtitle("Ideas respected by school committee") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 11),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Raise public goods issue at mtg
pred.PubGoodMtg <- rbind(EEFpred.PubGoodMtg,
                         GEFpred.PubGoodMtg)

EEFplot.PubGoodMtg <- ggplot(pred.PubGoodMtg, 
                              aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(1, 5) +
  ylab("Predicted Response on 1 to 5 scale") +
  xlab("Control Group Score") +
  ggtitle("Raise public goods issue at mtg") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Raise public goods issue w. official
pred.PubGoodDirect <- rbind(EEFpred.PubGoodDirect,
                            GEFpred.PubGoodDirect)

EEFplot.PubGoodDirect <- ggplot(pred.PubGoodDirect, 
                                 aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(1, 5) +
  ylab("Predicted Response on 1 to 5 scale") +
  xlab("Control Group Score") +
  ggtitle("Raise public goods issue w. official") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 12),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# Support pro-education candidate
pred.Candidate <- rbind(EEFpred.Candidate,
                        GEFpred.Candidate)

EEFplot.Candidate <- ggplot(pred.Candidate, 
                                 aes(x = EEFscore, y = est,
                            shape=var, group=var, colour=var)) + 
  geom_line(size=1, position=pd) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil)), 
                    ymax = as.numeric(as.character(ciu))), 
                width = 0, position=pd, lwd = .5) +
  geom_errorbar(aes(ymin = as.numeric(as.character(cil_90)), 
                    ymax = as.numeric(as.character(ciu_90))), 
                width = 0,  position=pd, lwd = 1.5) +
  ylim(0, 1) +
  ylab("Predicted Probability") +
  xlab("Control Group Score") +
  ggtitle("Support pro-education candidate") +
  scale_colour_manual(values=group.colors) +
  theme(panel.background = element_blank(),
        plot.title = element_text(size = 11),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position= "none")  

# combine plots
grid.arrange(EEFBplot.KFTotal_B, EEFBplot.CCK1_B_num, EEFBplot.EQ1_B_num, 
             EEFBplot.PP2_B_num, EEFBplot.CB1_B_num, EEFBplot.EQ5_B_bi, 
             EEFplot.Candidate, EEFplot.PubGoodMtg, EEFplot.PubGoodDirect, 
             #EEFplot.RespectedbyParents, EEFplot.RespectedbyAuth, EEFplot.RespectedIdeas, 
             nrow = 3)

@

Figure \ref{fig:EEFplot2} compares the predictive power of our educational self-efficacy score with the general self-efficacy score from \citet{Jerusalem:1995}. After controlling for other socio-demographic covariates, the associations between pro-development outcomes and the general self-efficacy score shown in gray are much weaker compared to those with our educational self-efficacy score shown in blue.


\newpage
\section{Bukoba School-Level Interviews and Outcomes}
\label{sec:SIbukobaqual}

In addition to our quantitative analyses, our qualitative research captured important post-treatment dynamics, indicating some potentially important differences in outcomes between treatment arms in the manner that we predicted theoretically (i.e. increased pro-development behaviors with boosts in self-efficacy under VP).\footnote{Reporting of qualitative data and analysis collected associated with RCT's is a disappointingly rare practice. One important exception is \citet{Rao:2017}, which demonstrates the key role qualitative data analysis can play in the interpretation of study findings.} Specifically, we collected interview data 6 months and 2 years after the experimental intervention in Bukoba for Study 1. We discuss both types of data in more detail below. 

%\subsection{Interview data examples, 6 months post-intervention}
<<Qual, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 7, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='hide'>>=

### Qualitative data analysis: proportion of positive versus neutral comments

## Compare head teachers, classroom teachers, and parents together
qualtestall <- prop.table(table(qualdat[qualdat$Who %in% c("HT", "CT", "par"),]$treat,
                                qualdat[qualdat$Who %in% c("HT", "CT", "par"),]$evidence), 1)

qualtestall.ttest.VPIW <- t.test(qualdat[qualdat$Who %in% c("HT", "CT", "par") & qualdat$treat == "VP",]$evidence,
                                 qualdat[qualdat$Who %in% c("HT", "CT", "par") & qualdat$treat == "IW",]$evidence)
# p-value = 0.09889

qualtestall.ttest.VPSO <- t.test(qualdat[qualdat$Who %in% c("HT", "CT", "par") & qualdat$treat == "VP",]$evidence,
                                 qualdat[qualdat$Who %in% c("HT", "CT", "par") & qualdat$treat == "SO",]$evidence)
# p-value = 0.008127

## Compare just parents 
qualtestpar <- prop.table(table(qualdat[qualdat$Who %in% c("par"),]$treat,
                                qualdat[qualdat$Who %in% c("par"),]$evidence), 1)

qualtestpar.ttest.VPIW <- t.test(qualdat[qualdat$Who %in% c("par") & qualdat$treat == "VP",]$evidence,
                                 qualdat[qualdat$Who %in% c("par") & qualdat$treat == "IW",]$evidence)
# p-value = 0.4632

qualtestpar.ttest.VPSO <- t.test(qualdat[qualdat$Who %in% c("par") & qualdat$treat == "VP",]$evidence,
                                 qualdat[qualdat$Who %in% c("par") & qualdat$treat == "SO",]$evidence)
# p-value = 0.8931

## Compare teachers
qualtesttch <- prop.table(table(qualdat[qualdat$Who %in% c("HT", "CT"),]$treat,
                                qualdat[qualdat$Who %in% c("HT", "CT"),]$evidence), 1)

qualtesttch.ttest.VPIW <- t.test(qualdat[qualdat$Who %in% c("HT", "CT") & qualdat$treat == "VP",]$evidence,
                                 qualdat[qualdat$Who %in% c("HT", "CT") & qualdat$treat == "IW",]$evidence)
# p-value = 0.01561

qualtesttch.ttest.VPSO <- t.test(qualdat[qualdat$Who %in% c("HT", "CT") & qualdat$treat == "VP",]$evidence,
                                 qualdat[qualdat$Who %in% c("HT", "CT") & qualdat$treat == "SO",]$evidence)
# p-value = 8.467e-05

@

We hired two research assistants to follow up with parents, classroom teachers and head teachers approximately 6 months after the conclusion of the endline survey. We planned for this research to cross-validate our survey findings, to capture any long term effects, and to investigate any unexpected or unanticipated behaviors that were not captured on the survey. More than anything, we set out to identify whether in slightly more conversational and reflective settings, individuals might provide clues or trace evidence about how they were affected by the treatment and as such, we oversampled on communities from our main treatment arm. Specifically, we identified the top 4 and bottom 2 school communities in terms of measured average gains in ESES from within the VP treatment group; the top 2 and bottom 2 from the IW group; and top 1 and bottom 1 from the SO group. Within each of these school communities, our research assistants interviewed the head teacher and one classroom teacher (total of 24 teachers) and two households among the study participants. We first selected the top 5 households in terms of measured educational efficacy gains from the VP and IW groups, and the best matching households from the SO group based on wealth, household size, religion, and number of children. We then randomly ordered these 5 households, and our research assistants interviewed the study parent of 2 of these households, going down the list of who was available (total of 24 parents). 

First, we summarize the key observations made by the facilitators during the IW and VP meetings, respectively, in Table \ref{tab:meetevidence}. We cannot include results from the SO group, as that arm did not include a meeting-based intervention. Of particular interest, during the IW workshops, the facilitators noted that parents were curious about what the sponsoring NGO, Twaweza, would do to help solve school problems. It is important to note that we had not discussed this possible outcome with our facilitators, nor was it part of the meeting scripts. By contrast, in the VP meetings, facilitators noted that parents expressed interest in volunteering and forming peer networks. Unprompted, these parents coordinated to donate money to buy materials for their respective schools. 

\begin{table}[]
\centering
\begin{tabular}{| L{17cm} | }
\hline\\
\textbf{Information Workshop}   \\
\vspace{-5mm}
\begin{itemize}
\small
\item
Parents seemed to think that Twaweza would be involved with teacher training after the study was over.
\item
Parents asked if Twaweza would buy books for the school teaching parents how to assist their children in their schoolwork at home.
\item
Parents asked how Twaweza would help solve the school's problems.
\end{itemize} 
\\ \hline \\
\textbf{Validated Participation } \\
\vspace{-5mm}
\begin{itemize}
\small
\item
One parent volunteered to donate 2 footballs to the school. After the school tour, Parents collectively decided to donate 500 shillings each to buy tree seedlings for the school. Parents set up a network for themselves, with leadership to follow up on the promises that they had made during the meetings.
\item
Over the course of the meetings, parents seemed to interact and listen to each other more.
\item
Parents decided to initiate their own network with leadership roles regarding parental engagement for their children.
\item
The parents organized into a network, and all agreed to donate 1000 shillings to renovate the boys' toilets.
\end{itemize}
\\ \hline
\end{tabular}
\caption{This table summarizes the qualitative evidence of facilitator notes taken during the IW and VP intervention meetings}
\label{tab:meetevidence}
\end{table}

In other words, VP parents indicated an inclination to take responsibility for influencing the local governance of education on their own, whereas IW parents were still looking to external authorities to ``do the work.'' This is despite the fact that in both sets of interventions, parents had been delivered the same message -- that they have a role to play in their children's education.

Second, for the follow up research conducted by our research assistants, we provided structured interview guides for interviewing parents, classroom teachers, and head teachers. We designed the qualitative research to focus on evaluating mechanisms with respect to very positive (and null) cases of efficacy change in order to detect behavioral effects. Our goal here was to try to identify evidence of actual post-treatment change measured through narrative accounts. The imbalance in our sampling strategy reflected a desire to uncover any evidence of change in the VP arm in particular -- because if we could not find any, that would indicate that we should not reject the null hypothesis of no effect. 

All interviews were transcribed. Subsequently, while blind to treatment assignment, we coded the responses to all questions with respect to whether they provided a clear answer to questions about observed changes in relevant pro-development behaviors; and if so, whether there was positive change (i.e., more pro-education actions by parents observed in the past few months), no change, or negative change. Because we did not find any responses that indicated negative change, essentially, all responses were coded in a binary manner with respect to the presence or absence of positive change. Examples of statements by teachers and parents and how we coded them are provided in table \ref{tab:qualexamples}.

\begin{table}[]
\centering
\begin{tabular}{ | L{3cm} | L{6cm} | L{6cm} |}
\hline
&	& \\
\underline{Coded as:} & \textbf{Classroom and Head Teachers} & \textbf{Parents and Caregivers} \\
&	& \\
\hline
&	& \\
\textbf{No Change} & {\small ``I have been teaching this class for a month now but throughout this period I have not have any interactions with parents.'' -- Classroom Teacher}                                                                       & {\small Do you feel you can help your child with his schoolwork? ``No, maybe his brother can help him. He has time for studying with his brothers,when I am busy in the kitchen..'' -- Parent} \\
&	& \\
\hline
&	& \\
\textbf{Positive Change} & {\small ``Yes. There was a public meeting around here, in which the District Executive Director (DED) was asked very sensible question by some parents on the school issues; the parents asked the DED how comes that the school is facing a shortage of teachers ... How can the school performance be improved without enough teachers? I find this as very new experience! This had never happened before.'' -- Classroom Teacher} 
  & {\small ``What moved me most is to realize that even the government wants to see us, common people working with the community in addressing the challenges of educating our children. I have also realized that the teachers find us making follow-ups to the education of our children and so they happen to be more responsible in their dealing with our children. There was nothing that I did not like in the study.'' -- Parent} \\
& &  \\
\hline                                                                                                                   \end{tabular}
\caption{This table shows examples of coded responses to structured questionnaire, blinded to treatment arm.}
\label{tab:qualexamples}
\end{table}

Perhaps not surprising, given our sampling strategy, parents across treatment arms overwhelmingly made comments suggesting positive change in pro-development behaviors (\Sexpr{round(qualtestpar[3,2], digits = 3)*100}\%, \Sexpr{round(qualtestpar[1,2], digits = 3)*100}\%, \Sexpr{round(qualtestpar[2,2], digits = 3)*100}\% of comments were positive for VP, IW and SO parents respectively).\footnote{The p-values from simple two-sided T-tests comparing the proportion of positive VP and IW parent comments and the proportion of positive VP and SO parent comments are \Sexpr{round(qualtestpar.ttest.VPIW$p.value, digits = 2)} and \Sexpr{round(qualtestpar.ttest.VPSO$p.value, digits = 2)}, respectively.} 
As it was beyond our capacity for this study to have our research assistants actually embed themselves in the respective communities, to observe parental behaviors on their own, we were still forced to rely upon self-reporting, and again, in this context, parents (with self-reported positive change in self-efficacy) almost universally reported positive change in pro-development. Thus, we did not observe differences across treatment arms.

Yet, comments from the classroom and head teachers were much more revealing. Teachers were not only unaware that the study involved multiple treatment arms across schools, but they also did not know the full content of the interventions at their own schools. Additionally, they were asked about parents' behaviors not their own or their fellow teachers. For these reasons, we believe they were less susceptible to social desirability bias, especially any that would privilege one treatment arm over the others. \Sexpr{round(qualtesttch[3,2], digits = 3)*100}\% of teacher comments indicated positive change in the VP communities, but for IW and SO communities, the proportion of positive teacher comments were much less at \Sexpr{round(qualtesttch[1,2], digits = 3)*100}\% and \Sexpr{round(qualtesttch[2,2], digits = 3)*100}\%, respectively.\footnote{The p-values from simple two-sided T-tests comparing the proportion of positive VP and IW teacher comments and the proportion of positive VP and SO teacher comments are \Sexpr{round(qualtesttch.ttest.VPIW$p.value, digits = 3)} and \Sexpr{round(qualtesttch.ttest.VPSO$p.value, digits = 4)}, respectively.}\footnote{Section \ref{sec:SIbukobaqual} in the SI provides additional details on the distribution of number of comments made by parents and teachers across treatment arms. Since we are simply reporting the proportion of positive comments, we may be concerned that there are a few individuals making many comments and that those who give more comments are also more likely to make positive comments. Figures \ref{fig:qualpar_commentsdist} and \ref{fig:qualtch_commentsdist} show that the distributions of number of comments made for VP and IW parents (ranging from 1 to 3) and teachers (ranging from 2 to 7) are comparable. And figures \ref{fig:qualpar_commentstype} and \ref{fig:qualtch_commentstype} show that for both parents and teachers, the positive comments were not concentrated in those who gave the most comments.}

But more telling than simply the quantity of the comments from the respective arms is what was actually said (all comments are reported in SI section \ref{sec:SIbukobaqual}). In the VP schools, teachers reported on quite meaningful engagement and interest, as well as visible active behaviors on the part of parents. 

The comparison with the IW responses is striking, because the number and duration of the meetings was extremely similar to the VP schools, and it seems implausible that social desirability bias would have varied across treatment arms. And yet, the nature of the responses from the IW schools portrays decidedly less engaged parents, with few concrete examples of any change since the time of the end of the intervention. We think it is reasonable to conclude that the Validated Participation intervention may well have provided the efficacy boost needed to encourage parents to participate in a more meaningful and sustained manner as compared with simply receiving information on its own.

Thus, we learn several lessons from this research. First, the validity of parent self-reports may be adversely affected by social desirability bias. Second, classroom teachers and head teachers seem less susceptible to these biases and appeared more willing to provide a range of (potentially more accurate) responses about parents' pro-development behaviors. Third, based on those accounts, it appears quite plausible that parents from school communities treated with VP emerge as more active citizens than those who received IW or SO. 

Figures \ref{fig:qualpar_commentsdist} and \ref{fig:qualtch_commentsdist} show the distribution of comments made (x-axis) across treatment arms for parents and teachers, respectively. While SO parents and teachers made the least number of comments, the distributions for VP and IW parents and teachers are comparable. 

<<qualpar_commentsdist, eval=TRUE, echo = FALSE, tidy = TRUE, fig.width = 7, fig.height = 3, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, fig.cap="This figure shows the distribution of comments made by parents across treatment arms.">>=

qualpar_commentsdist <- ggplot(qualdat_indiv[qualdat_indiv$Who %in% c("par"),], # parents
       aes(x=TotalComments)) + 
    geom_histogram(binwidth=1, colour="black", fill="white") + 
    facet_grid(treat ~ .) +
  ylab("Number of parents") +
  xlab("Number of comments") +
  theme(panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.justification = c(1, 1), 
        legend.position= c(.99, .99),
        legend.key = element_rect(colour = "transparent", fill = "white")
        ) 

qualpar_commentsdist

@

<<qualtch_commentsdist, eval=TRUE, echo = FALSE, tidy = TRUE, fig.width = 7, fig.height = 3, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, fig.cap="This figure shows the distribution of comments made by teachers across treatment arms.">>=

qualtch_commentsdist <- ggplot(qualdat_indiv[qualdat_indiv$Who %in% c("HT", "CT"),], # teachers
       aes(x=TotalComments)) + 
    geom_histogram(binwidth=1, colour="black", fill="white") + 
    facet_grid(treat ~ .) +
  ylab("Number of teachers") +
  xlab("Number of comments") +
  theme(panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.justification = c(1, 1), 
        legend.position= c(.99, .99),
        legend.key = element_rect(colour = "transparent", fill = "white")
        ) 

qualtch_commentsdist
@

Figures \ref{fig:qualpar_commentstype} and \ref{fig:qualtch_commentstype} show the number of comments and whether they indicate positive change (blue) or no change (gray) for each parent and teacher (x-axis), sorted from least to most comments, across treatment arms. These figures confirm that parents generally had positive comments, but across both parents and teachers, the positive comments were not concentrated in those who gave the most comments. 

<<qualpar_commentstype, eval=TRUE, echo = FALSE, tidy = TRUE, fig.width = 10, fig.height = 5, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, fig.cap="This figure shows the number of comments (positive or not) made by each parent, sorted from least to most comments, across treatment arms.">>=


## Plot positive versus no change by parent by treatment status
qualpar_plotVP <- ggplot(qualdat_indiv2[qualdat_indiv2$Who %in% c("par") &
                                        qualdat_indiv2$treat == "VP",],
    aes(x = reorder(who_spec,Comments), y = Comments, fill = ChangeType)) + 
    geom_bar(stat="identity", colour="black") +
    scale_fill_manual(values=c("gray70", "blue")) +
    ylab("Number of comments") +
    xlab("VP Parents") +
    ylim(0,4) +
    theme(panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.justification = c(0, 0), 
        legend.position= c(.01,.88),
        legend.box = "horizontal",
        legend.direction = "horizontal", 
        legend.key = element_rect(colour = "transparent", fill = "white"),
        axis.text.x = element_blank()
        ) 

qualpar_plotIW <- ggplot(qualdat_indiv2[qualdat_indiv2$Who %in% c("par") &
                                        qualdat_indiv2$treat == "IW",],
    aes(x = reorder(who_spec,Comments), y = Comments, fill = ChangeType)) + 
    geom_bar(stat="identity", colour="black") +
    scale_fill_manual(values=c("gray70", "blue")) +
    ylab("Number of comments") +
    xlab("IW Parents") +
    ylim(0,4) +
    theme(panel.background = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position = "none",
        axis.text.x = element_blank()
        ) 

qualpar_plotSO <- ggplot(qualdat_indiv2[qualdat_indiv2$Who %in% c("par") &
                                        qualdat_indiv2$treat == "SO",],
    aes(x = reorder(who_spec,Comments), y = Comments, fill = ChangeType)) + 
    geom_bar(stat="identity", colour="black") +
    scale_fill_manual(values=c("gray70", "blue")) +
    ylab("Number of comments") +
    xlab("SO Parents") +
    ylim(0,4) +
    theme(panel.background = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position = "none",
        axis.text.x = element_blank()
        ) 

grid.arrange(grobs = list(qualpar_plotVP, qualpar_plotIW, qualpar_plotSO), 
             layout_matrix = rbind(c(1,1,1,2,2,3)))

@


<<qualtch_commentstype, eval=TRUE, echo = FALSE, tidy = TRUE, fig.width = 10, fig.height = 5, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, fig.cap="This figure shows the number of comments (positive or not) made by each teacher, sorted from least to most comments, across treatment arms.">>=

## Plot positive versus no change by teacher by treatment status
qualtch_plotVP <- ggplot(qualdat_indiv2[qualdat_indiv2$Who %in% c("HT", "CT") &
                                        qualdat_indiv2$treat == "VP",],
    aes(x = reorder(who_spec,Comments), y = Comments, fill = ChangeType)) + 
    geom_bar(stat="identity", colour="black") +
    scale_fill_manual(values=c("gray70", "blue")) +
    ylab("Number of comments") +
    xlab("VP Teachers") +
    ylim(0,8) +
    theme(panel.background = element_blank(),
        legend.title = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.justification = c(0, 0), 
        legend.position= c(.01,.88),
        legend.box = "horizontal",
        legend.direction = "horizontal", 
        legend.key = element_rect(colour = "transparent", fill = "white"),
        axis.text.x = element_blank()
        ) 

qualtch_plotIW <- ggplot(qualdat_indiv2[qualdat_indiv2$Who %in% c("HT", "CT") &
                                        qualdat_indiv2$treat == "IW",],
    aes(x = reorder(who_spec,Comments), y = Comments, fill = ChangeType)) + 
    geom_bar(stat="identity", colour="black") +
    scale_fill_manual(values=c("gray70", "blue")) +
    ylab("Number of comments") +
    xlab("IW Teachers") +
    ylim(0,8) +
    theme(panel.background = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position = "none",
        axis.text.x = element_blank()
        ) 

qualtch_plotSO <- ggplot(qualdat_indiv2[qualdat_indiv2$Who %in% c("HT", "CT") &
                                        qualdat_indiv2$treat == "SO",],
    aes(x = reorder(who_spec,Comments), y = Comments, fill = ChangeType)) + 
    geom_bar(stat="identity", colour="black") +
    scale_fill_manual(values=c("gray70", "blue")) +
    ylab("Number of comments") +
    xlab("SO Teachers") +
    ylim(0,8) +
    theme(panel.background = element_blank(),
        panel.border = element_rect(colour = "gray", fill=NA, size=.8),
        legend.position = "none",
        axis.text.x = element_blank()
        ) 

grid.arrange(grobs = list(qualtch_plotVP, qualtch_plotIW, qualtch_plotSO), 
             layout_matrix = rbind(c(1,1,1,2,2,3)))

@


Finally, below are examples of responses by teachers across the three treatment arms:

\underline{Responses from Validated Participation Schools}
\begin{enumerate}
\item
They came to school to see the teacher. This was observed to both parents of standard three and other classes  Moreover, now we have phone numbers of parents which have enhanced communication between teachers and parents Qn. Is the rate of communication different or similar to how it was done before the recent meetings? There are differences, now communication and cooperation between parents and teachers has increased.                                                                                                                                                                              
\item
During our times when we were studying our parents were checking exercise books, even if they didn't know to read and write they still wanted to know if we are writing or doing something at school. Parents of nowadays they just want to use their children in doing farm and other domestic activities. Like here in Fridays, parents can just tell their children to go to the street market and miss studies.  You know that at least now the environment is very supportive, there is solar electricity but the morale for education is very low.                                                                    

\item
Sometimes they do assist; when we provide homework to pupils, we sometimes ask children to ask for help from parents; some pupils report to have been assisted by their parents but some do not.                                                                                                                                                                        \item
For example, when you left parents came to read the poster and now I can see some children have exercise books for their home exercises. They have more books than previous time. About whether they provide time and space I am not sure, I did not make follow-up of what is going on at home. In most cases we encourage parents to come at school and do their responsibilities.  Parents are involved in different village meetings where the ask leaders about school developments.    
\item
We had a meeting with parents, about forty parents turned up. In that meeting we discussed issues of truancy, cleanliness and children's food. From that day some parents are implementing what we agreed like now students are clean, they have uniforms and shoes. Some parents give their children food but others don't.  Another problem was the time children were coming to school, at least now they come a bit early, particularly those children who are from (redacted).                                                                                                                                        \item
Yes. Some of them. There are some parents who came to ask for their children's progress. Some others came to report their children that they were sick.                                                                                                                                                                                                                     \item
We have been communicating with parents since you left. First of all those parents who participated in the study continued to come and ask how their children are progressing academically. For example when they saw that their children's exercise books did not contain dates or is not marked, they came to ask to the respective subject teacher                                                                                                                                       \item
There is one neighbor who also participated; he told me that if this assessment could be done frequently it could raise education morale. I see the changes to his child; at least he knows what is going on. In general parents were happy and I think that facilitation you did made them enjoy the training. You know when you see people are talking about it know that they are happy! I suggest that if there is another possibility you can do it in all schools and may be you bring together parents and teachers.                                                                                                 

\item
When you see their exercises done in the classroom, they are doing it well. So I hope they will do better that the previous class                                                                                                               
\item
They will do better because their parents participate more in the education of their children after the series of meetings held by Twaweza.                                                                                                                                                                                                                         \item
This class has thirty three students and all can read and write. I'm expecting that they are going to do well though they might have little weaknesses.  Qn. Can you explain those weaknesses? I mean you cannot say for sure everything will be alright but these are human beings they may fall sick during examination                                                                                                                                                                          
\item
Yes! They were engaged but very minimally, you know to change some ones behavior is not easy. Since you came now when you call them or ask them to provide something to their children they respond and do it                                                                                                                                                            
\item
There was some parental engagement but it was very small compared to the situation after the study began; prior to the study, parents would only come if called but now some parents come on their own and ask teachers about their children's progress. This parental engagement has not reached 100\%.                                                                                                                                                                                           
\item
Before you came, we were observing and asking ourselves why children are not attending school? When we compare to this time after your meetings, I think parents were lacking some knowledge about why their children should come to school. I think you encouraged them, parents are now very close to school and they continue coming. For example, some of them have volunteered to bring some glasses and doors for construction of pre-primary children classroom.                          

\item
First of all other teachers their views was that the meetings could involve all teachers. Those scores for students, some teachers were not happy. Now they are putting more efforts so as to improve their performances.                          

\item
I think their participation in school will result in good results to the great extent. Possible results would include reducing absenteeism, and the performance in academics will improve.                                                                                                                                                                              
\item
It will be better; the teachers and the parents are now working as a team. We only need the government to furnish the school with enough teachers and the rest will be very okay.      

\item
As I said it was on 27th September, 2016. The parents spoke a lot and they encouraged each one to put into practice the agreed five objectives.                                                                                                                                                                                                                         
\item
No. Everything has been said already.                                                                                                                                                                                                                                                                                                                        
\item
I remember after earthquake, some parents contributed tree poles and money which was sent to the central pool.                                                                                                                                                                                                                                                   
\item
There was a public meeting around here  in which the District Executive Director (DED)was asked very sensible question by some parents on the school issues; the parents asked the DED how comes that the school is facing a shortage of teachers whereas you have this report on your table from the head teacher? How can the school performance be improved without enough teachers? I find this as very new experience! This had never happened before.                                                                                                                                                                 
\item
No. There have never been any interactions. If a child has a problem it is the responsibility of the class teacher to call the parent and discuss the problem. Problems that we face include students' learning materials; if the class teacher notices any problem, he informs me and in turn I give him permission to call and discuss the matter with the parent; but since November there has not been such requests.                                                                                                                                                                                                   
\item
Parents brought a letter asking for a meeting with head teacher, academic teacher and class three teacher. Unfortunately, the head teacher had an emergency so I represented him on that meeting. Parents also comes to see classroom teachers and there is good communication.                                                                                                                                                                                                                                                                                                                     
\item
Yes, on 27th September, 2016 after this study, we had a parents' meeting intended to include parents of all the children of this school.  This meeting was initiated by the standard thee parents because after the study the grade 3 parents set five objectives to implement. We called this meeting share these objectives with other parents. The attendance was comparatively very good since 328 out of 528 parents attended the meeting. This best attendance ever recorded was directly connected with influence of the study. The five objectives were put forward by the parents were discussed in his meeting.

\item
There is no cooperation. You call the parents for the meeting but only 40 attend while they were expected to be 90 through 100. The number remains the same; it does not increase.                                                                                                                                                                                   
\item
Prior to the study parents would only come if you force the students to go home and come with their parents but now just announce the meeting, you will be surprised, the attendance will be supper.  

\end{enumerate}


\underline{Responses from Information Workshop Schools}
\begin{enumerate}
\item
I have not seen any changes, may be they got that seminar and went with it home. If it is exercise books, children absenteeism is just the same! Considering now the situation is more difficult, people are focusing on what they will eat. May be only those who are supported by TASAF, you can see them with all school requirements.   May be if they could be seeing us who went to school have better life, now here people who are doing business have better life than us, now the parent asks I have to encourage my child to study so what?                                                                       
 \item
Homework! You are wasting your time. One day I asked if there is anyone who can provide a lamp for his child to study. They said no. but there are very few parents now, who have bought solar, and those children are clearly seen. You cannot plant a farm without weeding then expecting to harvest Most of these children do not have time to study at home, we are seeing their performances. May be their parents can buy exercise books, pen and school uniforms. Sometimes even these, they do after being forced to do so, when you look at students' exercise books you will be surprised the way they are worn out
 \item
I think I should say no. this is because I have not seen any parent coming to make follow-up of their children's academic progress may be if there is meeting. Most of these parents are not coming                                                                                                                                                           
 \item
In this year, I think they will do much better than last year. We are working hard to ensure that they do better, teachers are more committed! I think they will do better.                                                                                                                                                                                         \item
According to what I can see, the way they were doing before is the same to what is done now. Although I don't know what you told them, I don't see any changes                                                                                                                                                                                                            \item
I had a meeting with parents in September. The meeting aimed at electing members for the school committee. The new directives require the chairperson and the deputy chairperson of the committee to have attained at least a Form Four level of education. Some other issues discussed in the meeting were the problem of students' absenteeism.  There were some hot issues raised but they were connected to the previous leadership; for example parents questioned the school leadership on the contributions made for the toilets that were put under the control of the village leaders.                              
\item
Regarding the parents' participation, I will not say much because things that make them participate is beyond their capacity; for example, the distance from home to school, and school lunch. We will keep on encouraging them to participate in our meetings.                                                                                                                                                                                                                                 \item
Some specific actions that were  observed included  some parents who came to school to inquire from teachers on how to fill in the family tree. We have not observed specific action made by parents as a group.  There  are individual parents that come to school to report if their children will not attend school.                                                                                                                                                                           \item
Yes. There is communication because parents thought that the exercise is sustainable and so they were asking the possibility for them to share their learning with the rest of the parents. The challenge was they were few.                                                                                                                                       \item
Prior to the start of the study parents lacked awareness of their roles in education but now there are some observable changes;  for example,  to some extent parents show some awareness such that in the past parents would hardly come to school even if called but now they come sometimes on their own. Prior to the study, the interaction between parents and teachers was very little but now we see a difference; in the past a parent came to school only  if  they were being called but now they come freely even when they are not called.

\end{enumerate}

\underline{Responses from Survey Only/Control Schools}
\begin{enumerate}
\item
Very small percent;  we usually instruct children to tell their parents to check their exercise books but when we ask children whether the parents did as asked, their response becomes NO. In addition, when we instruct children to ask their parents to buy them exercise books, it takes a long time before we find children having the appropriate exercise books. This gives us the impressions that parents do not participate in the education of their children. In fact, I teach English and the majority of parents do not understand English, so they can do nothing to assist their children. What I know is that parents don't give their children time for studying instead they assign them other domestic roles like fetching water and firewood. Even when a child struggles on his own to find time for studying in the evening, some parents may be reluctant because they feel that the child is increasing the kerosene budget; this is partly contributed by the economic hardships affecting most rural families.

\item
I have been teaching this class for a month now but throughout this period I have not have any interactions with parents.   
\item
As I can see, 60\% of the students will perform well based on their day to day assessments. I only speak for the grade 3 students of this year because I did not teach the last year's grade 3 students.                                                                                                                      
\item
Parents' participation is very small; when children leave home to school, parents feel less concerned about the child. But if a child has a problem, such as absenteeism, teachers might call the parent, and together they can discuss the problem; the parent will implement the set strategy for the solution.                             
\item
After your study some parents came, they expected to get results of the examination you gave to their children.  Qn. How many parents came to ask for results? Almost ten parents showed up but we couldn't give those results as up to now the school has not received those results from Twaweza. Any other interactions apart from results? In most cases these parents are coming to make follow-up of how their children are progressing or else they came when we call them if there are problems.   

\end{enumerate}


% \newpage
% \subsection{Interview data 2 years post-intervention}

\newpage
\section{Binary Coding of Study 1 Follow-up with Teachers on School-Level Outcomes}
\label{sec:SIQual2results_binary}

<<Qual2results_binary, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 10, fig.height = 4.5, fig.align='center', fig.pos = 'H', out.width= "1\\linewidth", warning=FALSE, message=FALSE, fig.cap="Downstream Follow-Up in Study 1 Schools, two years later (N=117 teachers; 24 school clusters): Average treatment effects of VP (blue) and IW (red) compared to control on parental active citizenship outcomes 2 years later as reported on structured assessments with teachers (with 95$\\%$ and 90$\\%$ CIs). OLS models with respondent type FE and school cluster robust standard errors. VP--IW difference (black).">>=

## Recode to be binary
qual2 <- qual2 %>%
  mutate(
    ## Previously -1/0/1 outcomes
    change_edu_outcomes_bin = case_when(change_edu_outcomes %in% c(-1, 0)~0, TRUE~change_edu_outcomes),
    change_edu_resources_bin = case_when(change_edu_resources %in% c(-1, 0)~0, TRUE~change_edu_resources),
    different_par_stan5_bin = case_when(different_par_stan5 %in% c(-1, 0)~0, TRUE~different_par_stan5),
    past_study_students_bin = case_when(past_study_students %in% c(-1, 0)~0, TRUE~past_study_students),
    response_localgov_bin = case_when(response_localgov %in% c(-1, 0)~0, TRUE~response_localgov),
    ## Previously 0/1/2 outcomes
    actions_parent_group_bin = case_when(actions_parent_group %in% c(1, 2)~1, TRUE~actions_parent_group),
    parent_attend_speakup_3_bin = case_when(parent_attend_speakup_3 %in% c(1, 2)~1, TRUE~parent_attend_speakup_3),
    parent_interactions_2yrs_bin = case_when(parent_interactions_2yrs %in% c(1, 2)~1, TRUE~parent_interactions_2yrs),
    parentmeeting_last_1_bin = case_when(parentmeeting_last_1 ==2~1, parentmeeting_last_1==1~0, TRUE~parentmeeting_last_1)
  )

## Run models

## 3 point outcomes on levels of improvement

# change_edu_outcomes
# -1: doing worse; 0: stayed the same; 1: improved
change_edu_outcomes_bin <- lm_robust(change_edu_outcomes_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# change_edu_resources
# -1: doing worse; 0: stayed the same; 1: improved
change_edu_resources_bin <- lm_robust(change_edu_resources_bin ~ VP + IW, #not reliable responses
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# different_par_stan5
# -1: standard 5 parents less involved; 0: no difference: 1: standard 5 parents more involved
different_par_stan5_bin <- lm_robust(different_par_stan5_bin ~ VP + IW,
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# past_study_students
# -1: doing worse; 0: doing same; 1: doing better
past_study_students_bin <- lm_robust(past_study_students_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# response_localgov
# -1: doing worse; 0: stayed the same; 1: improved; NA
response_localgov_bin <- lm_robust(response_localgov_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

## 3 point outcomes on one or many

# actions_parent_group
# 0: teacher does not describe any actions; 1: teacher describes just one isolated action; 2: pattern of action / multiple actions
actions_parent_group_bin <- lm_robust(actions_parent_group_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_attend_speakup_3
# 0: few parents speak; 1: some parents speak; 2: many parents speak
parent_attend_speakup_3_bin <- lm_robust(parent_attend_speakup_3_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_interactions_2yrs
# 0: answer has no notable actions; 1: just one isolated action; 2: pattern of action / multiple actions
parent_interactions_2yrs_bin <- lm_robust(parent_interactions_2yrs_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parentmeeting_last_1
# 0: no meeting; 1: meeting but parents did not speak; 2: parents came and spoke up
parentmeeting_last_1_bin <- lm_robust(parentmeeting_last_1_bin ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

## Binary outcomes

# contributions_parents_financial
# 0: no or very low contributions; 1: yes some financial contributions
contributions_parents_financial <- lm_robust(contributions_parents_financial ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# contributions_parents_other
# 0: no or very low contributions; 1: not financial but any other form of contribution mentioned
contributions_parents_other <- lm_robust(contributions_parents_other ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# contributions_parents_any
# 0: no or very low contributions; 1: any contributions mentioned, financial or otherwise
contributions_parents_any <- lm_robust(contributions_parents_any ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# help_parents
# 0: parents not helpful; 1: parents helpful in at least some ways
help_parents <- lm_robust(help_parents ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_type
# 0: mostly elder men; 1: others speak up about the same
parent_type <- lm_robust(parent_type ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_attend_speakup_4
# 0: mostly elder men speak; 1: others speak up about the same
parent_attend_speakup_4 <- lm_robust(parent_attend_speakup_4 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)


## Combine effects
qual2effects_improvement_bin <- as.data.frame(rbind(mytidy(change_edu_outcomes_bin),
                                  #tidy(change_edu_resources_bin),
                                  #tidy(different_par_stan5_bin),
                                  mytidy(past_study_students_bin),
                                  mytidy(response_localgov_bin)))

qual2effects_improvement_bin$outcome2 <- c(rep("Educational outcomes", 3),
                                 rep("Study students", 3),
                                 rep("Local government responsiveness", 3))

qual2effects_improvement_bin$order <- seq(from = nrow(qual2effects_improvement_bin), to = 1, by = -1)

qual2effects_multiple_bin <- as.data.frame(rbind(mytidy(parent_interactions_2yrs_bin),
                                  mytidy(parentmeeting_last_1_bin),
                                  mytidy(actions_parent_group_bin)))

qual2effects_multiple_bin$outcome2 <- c(rep("Teacher parent interactions", 3),
                                    rep("Parents participate in mtgs", 3),
                                    rep("Parents taking notable actions", 3))

qual2effects_multiple_bin$order <- seq(from = nrow(qual2effects_multiple_bin), to = 1, by = -1)


qual2effects_binary <- as.data.frame(rbind(
                                  #tidy(contributions_parents_financial),
                                  #tidy(contributions_parents_other),
                                  mytidy(contributions_parents_any),
                                  mytidy(help_parents),
                                  #tidy(parent_type),
                                  mytidy(parent_attend_speakup_4)))

qual2effects_binary$outcome2 <- c(rep("Parents make contributions", 3),
                                 rep("Parents help with schoolwork", 3),
                                 rep("Diverse parents speaking", 3))

qual2effects_binary$order <- seq(from = nrow(qual2effects_binary), to = 1, by = -1)

## Generate plots
qual2plot_multiple_bin <- ggplot(qual2effects_multiple_bin, 
                             aes(x = reorder(outcome2, order),
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.7, 1) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    annotate("text", x=3.2, y=-.50, label= "VP-control", color = "#0072B2", size=3) + 
    annotate("text", x=3.1, y=-.50, label= "IW-control", color = "#ba0000", size=3) + 
    annotate("text", x=2.85, y=-.55, label= "VP-IW", color = "black", size=3) + 
    ggtitle("Frequency in past 2 years\n(0 none, 1 some or multiple)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

qual2plot_improvement_bin <- ggplot(qual2effects_improvement_bin, 
                                aes(x = reorder(outcome2, order),
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.7, 1) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    ggtitle("Change in past 2 years\n(0 worse or same, 1 better)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

qual2plot_binary <- ggplot(qual2effects_binary, 
                            aes(x = reorder(outcome2, order),
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.7, 1) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    ggtitle("Binary outcomes\n(0 no, 1 yes)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

## Show plots
grid.arrange(qual2plot_multiple_bin, 
             qual2plot_binary,
             qual2plot_improvement_bin,
             ncol = 3)

@

For the Study 1 Follow-up with Teachers in Bukoba, we coded the outcomes about frequency (0 none, 1 some, 2 multiple) and change (−1 worse, 0 same, 1 better) on three-point scales. As a robustness check, we code these outcomes on a binary scale. For frequency outcomes, 0 none and 1 some or multiple. For change outcomes, 0 worse or same and  1 better. As Figure \ref{fig:Qual2results_binary} shows, results are not substantively from Figure \ref{fig:Qual2results} in the manuscript.


\newpage
\section{Regression Adjustment using Lin's Regression}
\label{sec:SIlinadjust}

As a robustness test for our experimental results, we use the OLS interacted adjustment method proposed by \citet{Lin:2013}. We do this to address concerns about how our main regression specifications may be biased due to the baseline imbalance of efficacy scores in Study 1 and if there are heterogeneous treatment effects that are strongly related to covariates. Specifically, the adjusted specifications shown in this section include the interactions between demeaned covariates and the treatment indicators in order to improve precision. 

\subsection{Study 1: Effects on Parent and Student Outcomes in Bukoba Pilot}

For Study 1, we use OLS, regressing endline outcomes ($Y_{i2}$) on Validated Participation (VP) or Information Workshop (IW) treatment indicators, controlling for de-meaned baseline outcome measures ($\widetilde{Y}_{i1} = Y_{i1} - \overline{Y}_1$) as well as de-meaned demographic covariates ($\widetilde{\bf x}_i = {\bf x}_i - {\bf \overline{x}}$) along with their interaction with the treatment indicators, with cluster-robust standard errors at the school level:
\begin{equation}
Y_{i2} = \alpha + \beta_1 VP_i + \beta_2 IW_i + \beta_3 \widetilde{Y}_{i1} + \beta_4 \widetilde{\bf x}_i + \beta_5 VP_i \times \widetilde{Y}_{i1} + \beta_6 VP_i \times \widetilde{\bf x}_i + \beta_7 IW_i \times \widetilde{Y}_{i1} + \beta_8 IW_i \times \widetilde{\bf x}_i + \epsilon_i
\end{equation}

<<VP_EEF_Buk_lin, eval = TRUE, echo = FALSE, tidy=TRUE, warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

# Fit the linear mixed effects models, regressing efficacy outcomes on interventions and control vars
# FULL SAMPLE, WEIGHTED

# ESES score
EEFfit_lin <- lm_lin(EEFscore_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

# Internal ESES
EEFfitint_lin <- lm_lin(EEFinternal_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

# External ESES
EEFfitext_lin <- lm_lin(EEFexternal_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

# Individual ESES
EEFfitindiv_lin <- lm_lin(EEFindiv_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

# Group ESES
EEFfitgroup_lin <- lm_lin(EEFgroup_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

# GSES
GEFfit_lin <- lm_lin(GEFscore_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

@

<<VP_Beh_Buk_lin, eval = TRUE, echo = FALSE, tidy=TRUE, warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

#Fit the linear mixed effects models, regressing efficacy outcomes on interventions and control vars
# FULL SAMPLE, WEIGHTED

# Behavioral Outcomes
                          
# Outcome: Believes child will complete secondary school
EQ5_E.fit_lin <- lm_lin(EQ5_E_bi ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

# Outcome: Asked about teacher absence last week?
EQ1_E.fit_lin <- lm_lin(EQ1_E_num ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

# Outcome: Looked at HW last week?
PP2_E.fit_lin <- lm_lin(PP2_E_num ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

# Outcome: Child had breakfast today?
CB1_E.fit_lin <- lm_lin(CB1_E_num ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

# Outcome: Speak with teacher (endline only)
CP1_E.fit_lin <- lm_lin(CP1_E_num ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

# Outcome: Speak with parent (endline only)
FU1_E_bi.fit_lin <- lm_lin(FU1_E_bi ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

# Outcome: Test Scores
KFTotal_E.fit_lin <- lm_lin(KFTotal_E ~ TreatCat,
           ~ political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

@

<<VP_Results_Buk_lin, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 10, fig.height = 4.9, fig.align='center', fig.pos = 'H', out.width= "1\\linewidth", warning=FALSE, message=FALSE, fig.cap="Study 1 (N=598 parents; 24 school clusters): Average treatment effects of VP (blue) and IW (red) on endline efficacy and active citizenship outcomes (with 95 $\\%$ and 90$\\%$ CIs). OLS models using treatment-by-covariate interactions. VP--IW difference (black).">>=

## Combine effects for Efficacy
VP_EEF_Buk.combine_lin <- as.data.frame(rbind(mytidy(EEFfit_lin),
                                  mytidy(EEFfitint_lin),
                                  mytidy(EEFfitext_lin),
                                  mytidy(EEFfitindiv_lin),
                                  mytidy(EEFfitgroup_lin)))

VP_EEF_Buk.combine_lin <- VP_EEF_Buk.combine_lin[VP_EEF_Buk.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_EEF_Buk.combine_lin$outcome2 <- c(rep("Efficacy Score", 3),
                                 rep("Internal Efficacy", 3),
                                 rep("External Efficacy", 3),
                                 rep("Individual Efficacy", 3),
                                 rep("Group Efficacy", 3))

VP_EEF_Buk.combine_lin$order <- seq(from = nrow(VP_EEF_Buk.combine_lin), to = 1, by = -1)

## Generate plots for Efficacy
VP_EEF_Buk.plot_lin <- ggplot(VP_EEF_Buk.combine_lin, 
                          aes(x = reorder(outcome2, order), 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.35, .4) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    annotate("text", x=5.18, y=-.32, label= "VP", color = "#0072B2", size=3) + 
    annotate("text", x=5, y=-.32, label= "IW", color = "#ba0000", size=3) + 
    annotate("text", x=4.75, y=-.28, label= "VP-IW", color = "black", size=3) + 
    ggtitle("Efficacy Scores") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

## Combine effects for School Behaviors 
VP_Beh1_Buk.combine_lin <- as.data.frame(rbind(mytidy(EQ1_E.fit_lin),
                                  mytidy(CP1_E.fit_lin),
                                  mytidy(FU1_E_bi.fit_lin)))

VP_Beh1_Buk.combine_lin <- VP_Beh1_Buk.combine_lin[VP_Beh1_Buk.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_Beh1_Buk.combine_lin$outcome2 <- c(rep("Asked about teacher absence", 3),
                                 rep("Spoke with teacher last week", 3),
                                 rep("Wrote a comment for head teacher", 3))

VP_Beh1_Buk.combine_lin$order <- seq(from = nrow(VP_Beh1_Buk.combine_lin), to = 1, by = -1)

VP_Beh1_Buk.plot_lin <- ggplot(VP_Beh1_Buk.combine_lin, 
                           aes(x = reorder(outcome2, order), 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.35, .4) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    ggtitle("Teacher-Oriented Actions (0 no, 1 yes)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

VP_Beh2_Buk.combine_lin <- as.data.frame(rbind(mytidy(PP2_E.fit_lin),
                                  mytidy(CB1_E.fit_lin),
                                  mytidy(EQ5_E.fit_lin)))

VP_Beh2_Buk.combine_lin <- VP_Beh2_Buk.combine_lin[VP_Beh2_Buk.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_Beh2_Buk.combine_lin$outcome2 <- c(rep("Looked at HW last week", 3),
                                 rep("Gave breakfast today", 3),
                                 rep("Certain graduate secondary", 3))

VP_Beh2_Buk.combine_lin$order <- seq(from = nrow(VP_Beh2_Buk.combine_lin), to = 1, by = -1)

VP_Beh2_Buk.plot_lin <- ggplot(VP_Beh2_Buk.combine_lin, 
                           aes(x = reorder(outcome2, order), 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = NULL) +
    ylim(-.35, .4) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    ggtitle("Child-Oriented Actions (0 no, 1 yes)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))


## Effects for Test Scores
VP_KFTotal_Buk.combine_lin <- as.data.frame(mytidy(KFTotal_E.fit_lin))
                              
VP_KFTotal_Buk.combine_lin <- VP_KFTotal_Buk.combine_lin[VP_KFTotal_Buk.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_KFTotal_Buk.combine_lin$outcome2 <- c(rep("Test\nScore", 3))

VP_KFTotal_Buk.plot_lin <- ggplot(VP_KFTotal_Buk.combine_lin, 
                           aes(x = outcome2, 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-7, 5) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    ggtitle("Child's Test Score (/72 pts)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

## Show plots
stacked <- VP_Beh2_Buk.plot_lin/VP_KFTotal_Buk.plot_lin + plot_layout(heights = c(2.5, 1))

VP_EEF_Buk.plot_lin + VP_Beh1_Buk.plot_lin + stacked + plot_layout(widths = c(1, 1, 1))


@

Figure \ref{fig:VP_Results_Buk_lin} is not substantively different from Figure \ref{fig:VP_Results_Buk} in the manuscript.

We do not perform the same test for the results from Study 1 Follow-up with Teachers on School-Level Outcomes, because we do not perform covariate adjustment for those models. 

\subsection{Study 2: Effects on Parent Outcomes in Kilosa}

For Study 2, as the design of Study 2 was cross-sectional, we use OLS regressing outcomes ($Y_{i}$) on Validated Participation (VP) or Information Workshop (IW) treatment indicators, controlling for de-meaned demographic covariates ($\widetilde{\bf x}_i = {\bf x}_i - {\bf \overline{x}}$) along with their interaction with the treatment indicators, with school fixed effects:
\begin{equation}
Y_{i} = \alpha_s + \beta_1 VP_i + \beta_2 IW_i + \beta_3 \widetilde{\bf x}_i + \beta_4 VP_i \times \widetilde{\bf x}_i + \beta_5 IW_i \times \widetilde{\bf x}_i + \epsilon_i
\end{equation}

<<VP_EEF_Kil_lin, eval = TRUE, echo = FALSE, tidy=TRUE, warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=
EEFfit.kil_lin <- lm_lin(EEFscore ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFfitint.kil_lin <- lm_lin(EEFinternal ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFfitext.kil_lin <- lm_lin(EEFexternal ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFfitindiv.kil_lin <- lm_lin(EEFindiv ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFfitgroup.kil_lin <- lm_lin(EEFgroup ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

@

<<VP_Beh_Kil_lin, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 7, out.width= ".9\\linewidth", fig.pos = 'H', fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

# Outcome: Respected by Parents
RespectedbyParents.fit_lin <- lm_lin(RespectedbyParents ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

# Outcome: Respected by Authorities
RespectedbyAuth.fit_lin <- lm_lin(RespectedbyAuth ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

# Outcome: SC Ideas Respected
RespectedIdeas.fit_lin <- lm_lin(RespectedIdeas ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

# Outcome: Public Goods Mtg
PubGoodMtg.fit_lin <- lm_lin(PubGoodMtg ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

# Outcome: Public Goods Direct
PubGoodDirect.fit_lin <- lm_lin(PubGoodDirect ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

# Outcome: Support Pro-Education Candidate
Candidate.fit_lin <- lm_lin(Candidate ~ TreatCat,
             ~ morning + Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

@

<<VP_Results_Kil_lin, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 10, fig.height = 5, fig.align='center', fig.pos = 'H', out.width= "1\\linewidth", warning=FALSE, message=FALSE, fig.cap="Study 2 (N=1633 parents; individual-level treatment assignment): Average treatment effects of VP (blue) and IW (red) on same-day, post-meeting efficacy, pro-education political behaviors, and feeling respected (with 95$\\%$ and 90$\\%$ CIs). OLS models using treatment-by-covariate interactions. VP--IW difference (black).">>=

## Generate plots for Efficacy
VP_EEF_Kil.combine_lin <- as.data.frame(rbind(mytidy(EEFfit.kil_lin),
                                  mytidy(EEFfitint.kil_lin),
                                  mytidy(EEFfitext.kil_lin),
                                  mytidy(EEFfitindiv.kil_lin),
                                  mytidy(EEFfitgroup.kil_lin)))

VP_EEF_Kil.combine_lin <- VP_EEF_Kil.combine_lin[VP_EEF_Kil.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_EEF_Kil.combine_lin$outcome2 <- c(rep("Efficacy Score", 3),
                                 rep("Internal Efficacy", 3),
                                 rep("External Efficacy", 3),
                                 rep("Individual Efficacy", 3),
                                 rep("Group Efficacy", 3))

VP_EEF_Kil.combine_lin$order <- seq(from = nrow(VP_EEF_Kil.combine_lin), to = 1, by = -1)

VP_EEF_Kil.plot_lin <- ggplot(VP_EEF_Kil.combine_lin, 
                          aes(x = reorder(outcome2, order), 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.09, .2) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    annotate("text", x=5.18, y=-.075, label= "VP", color = "#0072B2", size=3) + 
    annotate("text", x=4.95, y=-.075, label= "IW", color = "#ba0000", size=3) + 
    annotate("text", x=4.7, y=-.062, label= "VP-IW", color = "black", size=3) + 
    ggtitle("Effects on Same Day\nEfficacy Scores") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

## Combine effects for School Behaviors 
VP_Beh1_Kil.combine_lin <- as.data.frame(rbind(mytidy(Candidate.fit_lin),
                                  mytidy(PubGoodMtg.fit_lin),
                                  mytidy(PubGoodDirect.fit_lin)))

VP_Beh1_Kil.combine_lin <- VP_Beh1_Kil.combine_lin[VP_Beh1_Kil.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_Beh1_Kil.combine_lin$outcome2 <- c(rep("Support pro-edu candidate (0 no, 1 yes)", 3),
                                 rep("Raise public goods issue at mtg", 3),
                                 rep("Raise public goods issue w. official", 3))

VP_Beh1_Kil.combine_lin$order <- seq(from = nrow(VP_Beh1_Kil.combine_lin), to = 1, by = -1)

VP_Beh1_Kil.plot_lin <- ggplot(VP_Beh1_Kil.combine_lin, 
                           aes(x = reorder(outcome2, order), 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
    geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.13, .25) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 13)) +
    ggtitle("Effects on Pro-Education\nPolitical Behaviors (1 - 5 scale)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

VP_Beh2_Kil.combine_lin <- as.data.frame(rbind(mytidy(RespectedbyParents.fit_lin),
                                  mytidy(RespectedbyAuth.fit_lin),
                                  mytidy(RespectedIdeas.fit_lin)))

VP_Beh2_Kil.combine_lin <- VP_Beh2_Kil.combine_lin[VP_Beh2_Kil.combine_lin$term %in% c("TreatCatVP", "TreatCatIW", "diff_vpiw"),]

VP_Beh2_Kil.combine_lin$outcome2 <- c(rep("Respected by other parents", 3),
                                 rep("Respected by authorities", 3),
                                 rep("Ideas respected by school committee", 3))

VP_Beh2_Kil.combine_lin$order <- seq(from = nrow(VP_Beh2_Kil.combine_lin), to = 1, by = -1)

VP_Beh2_Kil.plot_lin <- ggplot(VP_Beh2_Kil.combine_lin, 
                           aes(x = reorder(outcome2, order), 
                               y = estimate, 
                               group = term,
                               color = term)) +
    geom_hline(yintercept = 0, color = "gray80", lty = "dashed") +
    geom_point(position=position_dodge(width = .5), 
               aes(shape=term), size = 2.5) +
   geom_errorbar(aes(ymin=conf.low, ymax=conf.high), 
                  position=position_dodge(width = .5),
                   width=0, lwd = 1.5) +
    geom_errorbar(aes(ymin=`2.5 %`, ymax=`97.5 %`), 
                  position=position_dodge(width = .5),
                   width=0, lwd = .5) +
    scale_colour_manual(values=c("black", "#ba0000", "#0072B2")) +
    coord_flip() +
    labs(x = NULL, 
         y = "Average Treatment Effects") +
    ylim(-.18, .29) +
    scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
    ggtitle("Effects on Feeling Respected\n(1 - 5 scale)") +
    theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray", fill=NA, size=.8),
          legend.position = "none",
          axis.text.x  = element_text(angle=0, vjust=.5, hjust = .5, size=11))

## Show plots
grid.arrange(VP_EEF_Kil.plot_lin, 
             VP_Beh1_Kil.plot_lin, 
             VP_Beh2_Kil.plot_lin, ncol = 3)

@

Figure \ref{fig:VP_Results_Kil_lin} is not substantively different from Figure \ref{fig:VP_Results_Kil} in the manuscript.



\newpage
\section{Multiple Hypothesis Testing using Benjamini-Hochberg Procedure}
\label{sec:SImulthypothesis}

In this section, we address concerns about multiple hypothesis testing by adjusting for the false discovery rate (FDR). We show the Benjamini-Hochberg (BH) adjusted p-values for each test of our findings shown in Figures \ref{fig:VP_Results_Kil} and \ref{fig:Qual2results} in the paper. Since these are two separate studies, we adjust within each study. Furthermore, for the sets of outcomes, we show the adjusted p-values within estimates (VP, IW) across outcomes, and then within outcomes across estimates. With these more stringent adjusted p-values, all the statistically significant effects of VP retain their significance. 

<<VP_EEF_Kil, eval = TRUE, echo = FALSE, tidy=TRUE, warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

EEFfit.kil <- lm_robust(EEFscore ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFscore, na.rm = T), digits = 2) #mean and sd for SO
EEFsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFscore, na.rm = T), digits = 2)

EEFfitint.kil <- lm_robust(EEFinternal ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFsoint <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFinternal, na.rm = T), digits = 2) #mean and sd for SO
EEFsointsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFinternal, na.rm = T), digits = 2)

EEFfitext.kil <- lm_robust(EEFexternal ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFsoext <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFexternal, na.rm = T), digits = 2) #mean and sd for SO
EEFsoextsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFexternal, na.rm = T), digits = 2)

EEFfitindiv.kil <- lm_robust(EEFindiv ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFsoindiv <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFindiv, na.rm = T), digits = 2) #mean and sd for SO
EEFsoindivsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFindiv, na.rm = T), digits = 2)

EEFfitgroup.kil <- lm_robust(EEFgroup ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

EEFsogroup <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFgroup, na.rm = T), digits = 2) #mean and sd for SO
EEFsogroupsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFgroup, na.rm = T), digits = 2)

@

<<VP_Beh_Kil, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 7, out.width= ".9\\linewidth", fig.pos = 't!', fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

# Outcome: Respected by Parents
RespectedbyParents.fit <- lm_robust(RespectedbyParents ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

RespectedbyParentsso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyParents, 
                                     na.rm = T), digits = 2) #mean and sd for SO
RespectedbyParentssosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyParents, 
                                     na.rm = T), digits = 2)

# Outcome: Respected by Authorities
RespectedbyAuth.fit <- lm_robust(RespectedbyAuth ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

RespectedbyAuthso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyAuth, 
                                     na.rm = T), digits = 2) #mean and sd for SO
RespectedbyAuthsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyAuth, 
                                     na.rm = T), digits = 2)

# Outcome: SC Ideas Respected
RespectedIdeas.fit <- lm_robust(RespectedIdeas ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

RespectedIdeasso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$RespectedIdeas, 
                                     na.rm = T), digits = 2) #mean and sd for SO
RespectedIdeassosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$RespectedIdeas, 
                                     na.rm = T), digits = 2)

# Outcome: Public Goods Mtg
PubGoodMtg.fit <- lm_robust(PubGoodMtg ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

PubGoodMtgso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodMtg, 
                                     na.rm = T), digits = 2) #mean and sd for SO
PubGoodMtgsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodMtg, 
                                     na.rm = T), digits = 2)

# Outcome: Public Goods Direct
PubGoodDirect.fit <- lm_robust(PubGoodDirect ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

PubGoodDirectso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodDirect, 
                                     na.rm = T), digits = 2) #mean and sd for SO
PubGoodDirectsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodDirect, 
                                     na.rm = T), digits = 2)

# Outcome: Support Pro-Education Candidate
Candidate.fit <- lm_robust(Candidate ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               alpha = .1, 
               data = studyKil)

Candidateso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$Candidate, 
                                     na.rm = T), digits = 2) #mean and sd for SO
Candidatesosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$Candidate, 
                                     na.rm = T), digits = 2)

## Combine effects for Efficacy
VP_EEF_Kil.combine <- as.data.frame(rbind(mytidy(EEFfit.kil),
                                  mytidy(EEFfitint.kil),
                                  mytidy(EEFfitext.kil),
                                  mytidy(EEFfitindiv.kil),
                                  mytidy(EEFfitgroup.kil)))

VP_EEF_Kil.combine <- VP_EEF_Kil.combine[VP_EEF_Kil.combine$term %in% c("VP", "IW"),]

VP_EEF_Kil.combine$outcome2 <- c(rep("Efficacy Score", 2),
                                 rep("Internal Efficacy", 2),
                                 rep("External Efficacy", 2),
                                 rep("Individual Efficacy", 2),
                                 rep("Group Efficacy", 2))

VP_EEF_Kil.combine$order <- seq(from = nrow(VP_EEF_Kil.combine), to = 1, by = -1)

## Combine effects for School Behaviors 
VP_Beh1_Kil.combine <- as.data.frame(rbind(mytidy(Candidate.fit),
                                  mytidy(PubGoodMtg.fit),
                                  mytidy(PubGoodDirect.fit)))

VP_Beh1_Kil.combine <- VP_Beh1_Kil.combine[VP_Beh1_Kil.combine$term %in% c("VP", "IW"),]

VP_Beh1_Kil.combine$outcome2 <- c(rep("Support pro-edu candidate (0 no, 1 yes)", 2),
                                 rep("Raise public goods issue at mtg", 2),
                                 rep("Raise public goods issue w. official", 2))

VP_Beh1_Kil.combine$order <- seq(from = nrow(VP_Beh1_Kil.combine), to = 1, by = -1)

VP_Beh2_Kil.combine <- as.data.frame(rbind(mytidy(RespectedbyParents.fit),
                                  mytidy(RespectedbyAuth.fit),
                                  mytidy(RespectedIdeas.fit)))

VP_Beh2_Kil.combine <- VP_Beh2_Kil.combine[VP_Beh2_Kil.combine$term %in% c("VP", "IW"),]

VP_Beh2_Kil.combine$outcome2 <- c(rep("Respected by other parents", 2),
                                 rep("Respected by authorities", 2),
                                 rep("Ideas respected by school committee", 2))

VP_Beh2_Kil.combine$order <- seq(from = nrow(VP_Beh2_Kil.combine), to = 1, by = -1)

@

<<MultipleHypothesis_Kil, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

## BH p-value adjustment

bh_pval_table_kil <- bind_rows(VP_EEF_Kil.combine, 
          VP_Beh1_Kil.combine, 
          VP_Beh2_Kil.combine) %>%
  select(outcome2, term, estimate, std.error, pval_oneside) 

bh_kil_outcome <- bh_pval_table_kil %>%
  group_by(outcome2) %>%
  mutate(p.value.adj = p.adjust(pval_oneside, method = "BH")) %>%
  as.data.frame()

bh_kil_treatment <- bh_pval_table_kil %>%
  group_by(term) %>%
  mutate(p.value.adj = p.adjust(pval_oneside, method = "BH")) %>%
  as.data.frame()

### Print tables
colnames(bh_kil_outcome) <- c("Outcome", "Treatment",
                       "Effect size", "SE",
                       "p-value", "adjusted p-value")

colnames(bh_kil_treatment) <- c("Outcome", "Treatment",
                       "Effect size", "SE",
                       "p-value", "adjusted p-value")

print(xtable(bh_kil_outcome, 
             caption = "Adjusted p-values using Benjamini-Hochberg for 
             Kilosa study results (Fig. \\ref{fig:VP_Results_Kil} in the paper): 
             adjusting within each outcome, across treatment groups. 
             Under these more stringent adjusted p-values, the efficacy outcomes lose their statistical significance.",
             label = "tab:bh_kil_outcome", 
             digits = 2),
      include.rownames = F, 
      scalebox = .9,
      table.placement="H")

print(xtable(bh_kil_treatment, 
             caption = "Adjusted p-values using Benjamini-Hochberg for 
             Kilosa study results (Fig. \\ref{fig:VP_Results_Kil} in the paper): 
             adjusting within each treatment group, across outcomes. 
             Under these more stringent adjusted p-values, the efficacy outcomes lose their statistical significance.",
             label = "tab:bh_kil_treatment", 
             digits = 2),
      include.rownames = F, 
      scalebox = .9,
      table.placement="H")

@

<<MultipleHypothesis_BukQual2,  eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

## Run models

## 3 point outcomes on levels of improvement

# change_edu_outcomes
# -1: doing worse; 0: stayed the same; 1: improved
change_edu_outcomes <- lm_robust(change_edu_outcomes ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# change_edu_resources
# -1: doing worse; 0: stayed the same; 1: improved
change_edu_resources <- lm_robust(change_edu_resources ~ VP + IW, #not reliable responses
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# different_par_stan5
# -1: standard 5 parents less involved; 0: no difference: 1: standard 5 parents more involved
different_par_stan5 <- lm_robust(different_par_stan5 ~ VP + IW,
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# past_study_students
# -1: doing worse; 0: doing same; 1: doing better
past_study_students <- lm_robust(past_study_students ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# response_localgov
# -1: doing worse; 0: stayed the same; 1: improved; NA
response_localgov <- lm_robust(response_localgov ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

## 3 point outcomes on one or many

# actions_parent_group
# 0: teacher does not describe any actions; 1: teacher describes just one isolated action; 2: pattern of action / multiple actions
actions_parent_group <- lm_robust(actions_parent_group ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_attend_speakup_3
# 0: few parents speak; 1: some parents speak; 2: many parents speak
parent_attend_speakup_3 <- lm_robust(parent_attend_speakup_3 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_interactions_2yrs
# 0: answer has no notable actions; 1: just one isolated action; 2: pattern of action / multiple actions
parent_interactions_2yrs <- lm_robust(parent_interactions_2yrs ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parentmeeting_last_1
# 0: no meeting; 1: meeting but parents did not speak; 2: parents came and spoke up
parentmeeting_last_1 <- lm_robust(parentmeeting_last_1 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

## Binary outcomes

# contributions_parents_financial
# 0: no or very low contributions; 1: yes some financial contributions
contributions_parents_financial <- lm_robust(contributions_parents_financial ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# contributions_parents_other
# 0: no or very low contributions; 1: not financial but any other form of contribution mentioned
contributions_parents_other <- lm_robust(contributions_parents_other ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# contributions_parents_any
# 0: no or very low contributions; 1: any contributions mentioned, financial or otherwise
contributions_parents_any <- lm_robust(contributions_parents_any ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# help_parents
# 0: parents not helpful; 1: parents helpful in at least some ways
help_parents <- lm_robust(help_parents ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_type
# 0: mostly elder men; 1: others speak up about the same
parent_type <- lm_robust(parent_type ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_attend_speakup_4
# 0: mostly elder men speak; 1: others speak up about the same
parent_attend_speakup_4 <- lm_robust(parent_attend_speakup_4 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)


## Combine effects
qual2effects_improvement <- as.data.frame(rbind(mytidy(change_edu_outcomes),
                                  #tidy(change_edu_resources),
                                  #tidy(different_par_stan5),
                                  mytidy(past_study_students),
                                  mytidy(response_localgov)))

qual2effects_improvement <- qual2effects_improvement[qual2effects_improvement$term %in% c("VP", "IW"),]

qual2effects_improvement$outcome2 <- c(rep("Educational outcomes", 2),
                                 rep("Study students", 2),
                                 rep("Local government responsiveness", 2))

qual2effects_improvement$order <- seq(from = nrow(qual2effects_improvement), to = 1, by = -1)

qual2effects_multiple <- as.data.frame(rbind(mytidy(actions_parent_group),
                                  #tidy(parent_attend_speakup_3),
                                  mytidy(parent_interactions_2yrs),
                                  mytidy(parentmeeting_last_1)))

qual2effects_multiple <- qual2effects_multiple[qual2effects_multiple$term %in% c("VP", "IW"),]

qual2effects_multiple$outcome2 <- c(rep("Parents taking notable actions", 2),
                                 rep("Teacher parent interactions", 2),
                                 rep("Parents participate in meetings", 2))

qual2effects_multiple$order <- seq(from = nrow(qual2effects_multiple), to = 1, by = -1)


qual2effects_binary <- as.data.frame(rbind(
                                  #tidy(contributions_parents_financial),
                                  #tidy(contributions_parents_other),
                                  mytidy(contributions_parents_any),
                                  mytidy(help_parents),
                                  #tidy(parent_type),
                                  mytidy(parent_attend_speakup_4)))

qual2effects_binary <- qual2effects_binary[qual2effects_binary$term %in% c("VP", "IW"),]


qual2effects_binary$outcome2 <- c(rep("Parents make contributions", 2),
                                 rep("Parents help with schoolwork", 2),
                                 rep("Diverse parents speaking", 2))

qual2effects_binary$order <- seq(from = nrow(qual2effects_binary), to = 1, by = -1)


## BH p-value adjustment
bh_pval_table_qual2 <- bind_rows(qual2effects_improvement, 
          qual2effects_multiple, 
          qual2effects_binary) %>%
  select(outcome2, term, estimate, std.error, pval_oneside) 

bh_buk_outcome <- bh_pval_table_qual2 %>%
  group_by(outcome2) %>%
  mutate(p.value.adj = p.adjust(pval_oneside, method = "BH")) %>%
  as.data.frame()

bh_buk_treatment <- bh_pval_table_qual2 %>%
  group_by(term) %>%
  mutate(p.value.adj = p.adjust(pval_oneside, method = "BH")) %>%
  as.data.frame()

### Print tables
colnames(bh_buk_outcome) <- c("Outcome", "Treatment",
                       "Effect size", "SE",
                       "p-value", "adjusted p-value")

colnames(bh_buk_treatment) <- c("Outcome", "Treatment",
                       "Effect size", "SE",
                       "p-value", "adjusted p-value")

print(xtable(bh_buk_outcome, 
             caption = "Adjusted p-values using Benjamini-Hochberg for 
             Bukoba study results (Fig. \\ref{fig:Qual2results} in the paper): 
             adjusting within each outcome, across treatment groups.
             All the statistically significant effects still retain their significance.",
             label = "tab:bh_buk_outcome", 
             digits = 2),
      include.rownames = F, 
      scalebox = 1,
      table.placement="H")

print(xtable(bh_buk_treatment, 
             caption = "Adjusted p-values using Benjamini-Hochberg for 
             Bukoba study results (Fig. \\ref{fig:Qual2results} in the paper): 
             adjusting within each treatment group, across outcomes. 
             All the statistically significant effects still retain their significance.",
             label = "tab:bh_buk_treatment", 
             digits = 2),
      include.rownames = F, 
      scalebox = 1,
      table.placement="H")

@


\newpage
\section{Regression Tables}
\label{sec:SIregtables}

Regression Tables for Figures \ref{fig:VP_Results_Buk}, \ref{fig:Qual2results}, and \ref{fig:VP_Results_Kil} in the manuscript.

%\subsection{Regression Tables for Figure \ref{fig:VP_Results_Buk}}
% Fig 4: BUKOBA PARENT OUTCOME TABLE
<<Bukobaregtable1, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

# Fit the linear mixed effects models, regressing efficacy outcomes on interventions and control vars
# FULL SAMPLE, WEIGHTED

# ESES score
EEFfit <- lm_robust(EEFscore_E ~ VP + IW + EEFscore_B + 
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

EEFbase <- round(mean(studyBuk$EEFscore_B, na.rm = T), digits = 2) #mean and sd at baseline
EEFbasesd <- round(sd(studyBuk$EEFscore_B, na.rm = T), digits = 2)

# Internal ESES
EEFfitint <- lm_robust(EEFinternal_E ~ VP + IW + EEFinternal_B + 
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

EEFbaseint <- round(mean(studyBuk$EEFinternal_B, na.rm = T), digits = 2) #mean and sd at baseline
EEFbaseintsd <- round(sd(studyBuk$EEFinternal_B, na.rm = T), digits = 2)

# External ESES
EEFfitext <- lm_robust(EEFexternal_E ~ VP + IW + EEFexternal_B + 
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

EEFbaseext <- round(mean(studyBuk$EEFexternal_B, na.rm = T), digits = 2) #mean and sd at baseline
EEFbaseextsd <- round(sd(studyBuk$EEFexternal_B, na.rm = T), digits = 2)

# Individual ESES
EEFfitindiv <- lm_robust(EEFindiv_E ~ VP + IW + EEFindiv_B +  
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

EEFbaseindiv <- round(mean(studyBuk$EEFindiv_B, na.rm = T), digits = 2) #mean and sd at baseline
EEFbaseindivsd <- round(sd(studyBuk$EEFindiv_B, na.rm = T), digits = 2)

# Group ESES
EEFfitgroup <- lm_robust(EEFgroup_E ~ VP + IW + EEFgroup_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

EEFbasegroup <- round(mean(studyBuk$EEFgroup_B, na.rm = T), digits = 2) #mean and sd at baseline
EEFbasegroupsd <- round(sd(studyBuk$EEFgroup_B, na.rm = T), digits = 2)

# GSES
GEFfit <- lm_robust(GEFscore_E ~ VP + IW + GEFscore_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1, 
             clusters = SchoolID,
             data = studyBuk)

GEFbase <- round(mean(studyBuk$GEFscore_B, na.rm = T), digits = 2) #mean and sd at baseline
GEFbasesd <- round(sd(studyBuk$GEFscore_B, na.rm = T), digits = 2)

VP_EEF_Buk.combine <- as.data.frame(rbind(mytidy(EEFfit),
                                  mytidy(EEFfitint),
                                  mytidy(EEFfitext),
                                  mytidy(EEFfitindiv),
                                  mytidy(EEFfitgroup))) %>%
  filter(term == "diff_vpiw") %>%
  mutate(text = paste0(round(estimate, 2), " (", round(std.error, 2), ")"))

## Create table
table <- capture.output({ # Store the stargazer output in a string
 texreg(list(EEFfit, EEFfitint, EEFfitext, EEFfitindiv, EEFfitgroup),
       custom.gof.rows = list("Base Mean" = c(EEFbase, EEFbaseint, EEFbaseext, EEFbaseindiv, EEFbasegroup),
                              "Base SD" = c(EEFbasesd, EEFbaseintsd, EEFbaseextsd, EEFbaseindivsd, EEFbasegroupsd),
                              "VP - IW" = VP_EEF_Buk.combine %>% pull(text)),
       custom.model.names = c("Efficacy", "Internal Eff", "External Eff", "Individual Eff", "Group Eff"),
       custom.coef.map = list("VP" = "VP", 
                              "IW" = "IW", 
                              "EEFscore_B" = "Base Efficacy", 
                              "EEFinternal_B" = "Base Internal Eff", 
                              "EEFexternal_B" = "Base External Eff", 
                              "EEFindiv_B" = "Base Individual Eff", 
                              "EEFgroup_B" = "Base Group Eff",
                              "political_B" = "Political",
                              "parent_B" = "Parent (vs. Caregiver)", 
                              "muslim_B" = "Muslim", 
                              "literate_B" = "Literate",
                              "HHhead_B" = "Household Head", 
                              "HH1_B" = "Household Size",
                              "Female_B" = "Female", 
                              "econindexSUM_B" = "SES Index",
                              "disabilities_B" = "Child w. Disabilities", 
                              "CH1_B" = "No. of Children",
                              "BC5_B_num" = "Education Level", 
                              "AgeBin" = "Age",
                              "(Intercept)" = "Intercept"),
       include.ci = FALSE, single.row = TRUE, stars = c(0.01, 0.05, 0.1), 
       caption = "Study 1 Bukoba Efficacy Outcomes: Educational Efficacy score, Internal, External, Individual, and Group scores on VP and IW interventions (as opposed to SO) using OLS models with demographic covariates and school cluster robust standard errors. Below each model are the means and standard deviations for baseline.",
          label = "tab:RegTab1_Buk1")

})

table <- gsub("\\begin{tabular}","\\resizebox{.9\\textwidth}{!}{\\begin{tabular}", table, fixed=T)

table <- gsub("\\end{tabular}","\\end{tabular}}", table, fixed=T)

table <- gsub("[!htbp]", "[htp]", table, fixed=T)

cat(table)

@


<<Bukobaregtable2, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

#Fit the linear mixed effects models, regressing efficacy outcomes on interventions and control vars
# FULL SAMPLE, WEIGHTED

# Behavioral Outcomes
                          
# Outcome: Believes child will complete secondary school
EQ5_E.fit <- lm_robust(EQ5_E_bi ~ VP + IW + 
                            EQ5_B_bi + EEFscore_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

EQ5base <- round(mean(studyBuk$EQ5_B_num, na.rm = T), digits = 2) #mean and sd at baseline
EQ5basesd <- round(sd(studyBuk$EQ5_B_num, na.rm = T), digits = 2)

# Outcome: Asked about teacher absence last week?
EQ1_E.fit <- lm_robust(EQ1_E_num ~ VP + IW + 
                          EQ1_B_num + EEFscore_B + 
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

EQ1base <- round(mean(studyBuk$EQ1_B_num, na.rm = T), digits = 2) #mean and sd at baseline
EQ1basesd <- round(sd(studyBuk$EQ1_B_num, na.rm = T), digits = 2)

# Outcome: Looked at HW last week?
PP2_E.fit <- lm_robust(PP2_E_num ~ VP + IW + 
                          PP2_B_num + EEFscore_B + 
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

PP2base <- round(mean(studyBuk$PP2_B_num, na.rm = T), digits = 2) #mean and sd at baseline
PP2basesd <- round(sd(studyBuk$PP2_B_num, na.rm = T), digits = 2)

# Outcome: Child had breakfast today?
CB1_E.fit <- lm_robust(CB1_E_num ~ VP + IW + 
                          CB1_B_num + EEFscore_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

CB1base <- round(mean(studyBuk$CB1_B_num, na.rm = T), digits = 2) #mean and sd at baseline
CB1basesd <- round(sd(studyBuk$CB1_B_num, na.rm = T), digits = 2)

# Outcome: Speak with teacher (endline only)
CP1_E.fit <- lm_robust(CP1_E_num ~ VP + IW + 
                         EEFscore_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

CP1end <- round(mean(studyBuk$CP1_E_num, na.rm = T), digits = 2) #mean and sd at baseline
CP1endsd <- round(sd(studyBuk$CP1_E_num, na.rm = T), digits = 2)

# Outcome: Speak with parent (endline only)
FU1_E_bi.fit <- lm_robust(FU1_E_bi ~ VP + IW + 
                         EEFscore_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

FU1end <- round(mean(studyBuk$FU1_E_bi, na.rm = T), digits = 2) #mean and sd at baseline
FU1endsd <- round(sd(studyBuk$FU1_E_bi, na.rm = T), digits = 2)

# Outcome: Test Scores
KFTotal_E.fit <- lm_robust(KFTotal_E ~ VP + IW + 
                         KFTotal_B + EEFscore_B +
             political_B + parent_B + muslim_B + 
             literate_B + HHhead_B + HH1_B +
             Female_B + econindexSUM_B + disabilities_B_bi +
             CH1_B + BC5_B_num + AgeBin,
             weights = cbpsweights,
             alpha = .1,
             clusters = SchoolID,
             data = studyBuk)

KFTotalbase <- round(mean(studyBuk$KFTotal_B, na.rm = T), digits = 2) #mean and sd at baseline
KFTotalbasesd <- round(sd(studyBuk$KFTotal_B, na.rm = T), digits = 2)

VP_Beh1_Buk.combine <- as.data.frame(rbind(mytidy(EQ1_E.fit),
                                  mytidy(CP1_E.fit),
                                  mytidy(FU1_E_bi.fit),
                                  mytidy(PP2_E.fit),
                                  mytidy(CB1_E.fit),
                                  mytidy(EQ5_E.fit),
                                  mytidy(KFTotal_E.fit))) %>%
  filter(term == "diff_vpiw") %>%
  mutate(text = paste0(round(estimate, 2), " (", round(std.error, 2), ")"))

## Create table
table <- capture.output({ # Store the stargazer output in a string
  texreg(list(EQ1_E.fit, CP1_E.fit, FU1_E_bi.fit, PP2_E.fit, CB1_E.fit, EQ5_E.fit, KFTotal_E.fit),
       custom.gof.rows = list("Base Mean" = c(EQ1base, "Endline only", "Endline only", 
                             PP2base, CB1base, EQ5base, KFTotalbase),
                              "Base SD" = c(EQ1basesd, "Endline only", "Endline only", 
                             PP2basesd, CB1basesd, EQ5basesd, KFTotalbasesd),
                              "VP - IW" = VP_Beh1_Buk.combine %>% pull(text)),
       custom.model.names = c("Teacher Absence Ask", 
                            "Spoke w Teacher", 
                            "Comment for HT", 
                            "Looked at HW", 
                            "Gave Breakfast",
                            "Secondary",
                            "Test Score"),
       custom.coef.map = list("VP" = "VP", 
                              "IW" = "IW", 
                              "EQ1_B_num" = "Base Teacher Absence Ask", 
                               "PP2_B_num" = "Base Looked at HW", 
                              "CB1_B_num" = "Base Gave Breakfast",
                              "EQ5_B_bi" = "Base Secondary",
                              "KFTotal_B" = "Base Test Score",
                               "EEFscore_B" = "Base Efficacy",
                              "political_B" = "Political",
                              "parent_B" = "Parent (vs. Caregiver)", 
                              "muslim_B" = "Muslim", 
                              "literate_B" = "Literate",
                              "HHhead_B" = "Household Head", 
                              "HH1_B" = "Household Size",
                              "Female_B" = "Female", 
                              "econindexSUM_B" = "SES Index",
                              "disabilities_B" = "Child w. Disabilities", 
                              "CH1_B" = "No. of Children",
                              "BC5_B_num" = "Education Level", 
                              "AgeBin" = "Age",
                              "(Intercept)" = "Intercept"),
       include.ci = FALSE, single.row = TRUE, stars = c(0.01, 0.05, 0.1), 
       caption = "Study 1 Bukoba Behavior and Test Score Outcomes on VP and IW interventions (as opposed to SO) using OLS models with demographic covariates and school cluster robust standard errors. Below each model are the means and standard deviations for baseline.",
          label = "tab:RegTab2_Buk1")
})

table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table, fixed=T)

table <- gsub("\\end{tabular}","\\end{tabular}}", table, fixed=T)

table <- gsub("[!htbp]", "[H]", table, fixed=T)

cat(table)

@


%\subsection{Regression Tables for Figure \ref{fig:Qual2results}}

% Fig 6: BUKOBA QUALITATIVE TABLE

<<BukobaQual2regtable1, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=


## 3 point outcomes on levels of improvement

# change_edu_outcomes
# -1: doing worse; 0: stayed the same; 1: improved
change_edu_outcomes <- lm_robust(change_edu_outcomes ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# change_edu_resources
# -1: doing worse; 0: stayed the same; 1: improved
change_edu_resources <- lm_robust(change_edu_resources ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# different_par_stan5
# -1: standard 5 parents less involved; 0: no difference: 1: standard 5 parents more involved
different_par_stan5 <- lm_robust(different_par_stan5 ~ VP + IW,
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# past_study_students
# -1: doing worse; 0: doing same; 1: doing better
past_study_students <- lm_robust(past_study_students ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# response_localgov
# -1: doing worse; 0: stayed the same; 1: improved; NA
response_localgov <- lm_robust(response_localgov ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

## 3 point outcomes on one or many

# actions_parent_group
# 0: teacher does not describe any actions; 1: teacher describes just one isolated action; 2: pattern of action / multiple actions
actions_parent_group <- lm_robust(actions_parent_group ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_attend_speakup_3
# 0: few parents speak; 1: some parents speak; 2: many parents speak
parent_attend_speakup_3 <- lm_robust(parent_attend_speakup_3 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_interactions_2yrs
# 0: answer has no notable actions; 1: just one isolated action; 2: pattern of action / multiple actions
parent_interactions_2yrs <- lm_robust(parent_interactions_2yrs ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parentmeeting_last_1
# 0: no meeting; 1: meeting but parents did not speak; 2: parents came and spoke up
parentmeeting_last_1 <- lm_robust(parentmeeting_last_1 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

qual2effects_multiple <- as.data.frame(rbind(mytidy(parent_interactions_2yrs),
                                  mytidy(parentmeeting_last_1),
                                  mytidy(actions_parent_group),
                                  mytidy(change_edu_outcomes),
                                  mytidy(past_study_students),
                                  mytidy(response_localgov))) %>%
  filter(term == "diff_vpiw") %>%
  mutate(text = paste0(round(estimate, 2), " (", round(std.error, 2), ")"))


## Create table
table <- capture.output({ # Store the stargazer output in a string
  texreg(list(parent_interactions_2yrs, 
              parentmeeting_last_1,
              actions_parent_group,
              change_edu_outcomes,
              past_study_students,
              response_localgov),
       custom.gof.rows = list("Resp Type FE" = c("Yes", "Yes", "Yes", "Yes", "Yes", "Yes"),
                              "VP - IW" = qual2effects_multiple %>% pull(text)),
       custom.model.names = c("Teacher Interactions", 
                            "Participate in Mtgs",
                            "Notable Actions",
                            "Edu Outcomes", 
                            "Study Students",
                            "Local Gov Response"),
       custom.coef.map = list("VP" = "VP", 
                              "IW" = "IW", 
                              "(Intercept)" = "Intercept"),
       include.ci = FALSE, single.row = TRUE, stars = c(0.01, 0.05, 0.1), 
       caption = "Study 1 Bukoba, 3 point scaled School-Level Outcomes on VP and IW interventions (as opposed to SO) using OLS models with respondent type fixed effects and school cluster robust standard errors.",
          label = "tab:RegTab1_Buk2")
})

table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table, fixed=T)

table <- gsub("\\end{tabular}","\\end{tabular}}", table, fixed=T)

table <- gsub("[!htbp]", "[H]", table, fixed=T)

cat(table)

@

<<BukobaQual2regtable2, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

## Binary outcomes

# contributions_parents_financial
# 0: no or very low contributions; 1: yes some financial contributions
contributions_parents_financial <- lm_robust(contributions_parents_financial ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# contributions_parents_other
# 0: no or very low contributions; 1: not financial but any other form of contribution mentioned
contributions_parents_other <- lm_robust(contributions_parents_other ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# contributions_parents_any
# 0: no or very low contributions; 1: any contributions mentioned, financial or otherwise
contributions_parents_any <- lm_robust(contributions_parents_any ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# help_parents
# 0: parents not helpful; 1: parents helpful in at least some ways
help_parents <- lm_robust(help_parents ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_type
# 0: mostly elder men; 1: others speak up about the same
parent_type <- lm_robust(parent_type ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

# parent_attend_speakup_4
# 0: mostly elder men speak; 1: others speak up about the same
parent_attend_speakup_4 <- lm_robust(parent_attend_speakup_4 ~ VP + IW, 
                       data = qual2[qual2$respondenttype2 != "Research Assistant",],
                       fixed_effects = ~respondenttype2,
                       alpha = .1, 
                       clusters = schoolname)

qual2effects_binary <- as.data.frame(rbind(
                                  mytidy(contributions_parents_any),
                                  mytidy(help_parents),
                                  mytidy(parent_attend_speakup_4))) %>%
  filter(term == "diff_vpiw") %>%
  mutate(text = paste0(round(estimate, 2), " (", round(std.error, 2), ")"))


## Create table
table <- capture.output({ # Store the stargazer output in a string
  texreg(list(contributions_parents_any, 
              help_parents,
              parent_attend_speakup_4),
       custom.gof.rows = list("Resp Type FE" = c("Yes", "Yes", "Yes"),
                              "VP - IW" = qual2effects_binary %>% pull(text)),
       custom.model.names = c("Contributions", 
                            "Help w. Schoolwork",
                            "Diverse Speaking"),
       custom.coef.map = list("VP" = "VP", 
                              "IW" = "IW", 
                              "(Intercept)" = "Intercept"),
       include.ci = FALSE, single.row = TRUE, stars = c(0.01, 0.05, 0.1), 
       caption = "Study 1 Bukoba Binary School-Level Outcomes on VP and IW interventions (as opposed to SO) using OLS models with respondent type fixed effects and school cluster robust standard errors.",
          label = "tab:RegTab2_Buk2")
})

table <- gsub("\\begin{tabular}","\\resizebox{.6\\textwidth}{!}{\\begin{tabular}", table, fixed=T)

table <- gsub("\\end{tabular}","\\end{tabular}}", table, fixed=T)

table <- gsub("[!htbp]", "[H]", table, fixed=T)

cat(table)

@


%\subsection{Regression Tables for Figure \ref{fig:VP_Results_Kil}}

% Fig 5: KILOSA TABLES

<<Kilosaregtable1, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

EEFfit.kil <- lm_robust(EEFscore ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

EEFso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFscore, na.rm = T), digits = 2) #mean and sd for SO
EEFsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFscore, na.rm = T), digits = 2)

EEFfitint.kil <- lm_robust(EEFinternal ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

EEFsoint <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFinternal, na.rm = T), digits = 2) #mean and sd for SO
EEFsointsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFinternal, na.rm = T), digits = 2)

EEFfitext.kil <- lm_robust(EEFexternal ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

EEFsoext <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFexternal, na.rm = T), digits = 2) #mean and sd for SO
EEFsoextsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFexternal, na.rm = T), digits = 2)

EEFfitindiv.kil <- lm_robust(EEFindiv ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

EEFsoindiv <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFindiv, na.rm = T), digits = 2) #mean and sd for SO
EEFsoindivsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFindiv, na.rm = T), digits = 2)

EEFfitgroup.kil <- lm_robust(EEFgroup ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

EEFsogroup <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$EEFgroup, na.rm = T), digits = 2) #mean and sd for SO
EEFsogroupsd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$EEFgroup, na.rm = T), digits = 2)

VP_EEF_Kil.combine <- as.data.frame(rbind(mytidy(EEFfit.kil),
                                  mytidy(EEFfitint.kil),
                                  mytidy(EEFfitext.kil),
                                  mytidy(EEFfitindiv.kil),
                                  mytidy(EEFfitgroup.kil))) %>%
  filter(term == "diff_vpiw") %>%
  mutate(text = paste0(round(estimate, 2), " (", round(std.error, 2), ")"))


## Create table
table <- capture.output({ # Store the stargazer output in a string
  texreg(list(EEFfit.kil, 
              EEFfitint.kil,
              EEFfitext.kil,
              EEFfitindiv.kil,
              EEFfitgroup.kil),
       custom.gof.rows = list("School FE" = c("Yes", "Yes", "Yes", "Yes", "Yes"),
                              "Control Mean" = c(EEFso, EEFsoint, EEFsoext, EEFsoindiv, EEFsogroup),
                              "Control SD" = c(EEFsosd, EEFsointsd, EEFsoextsd, EEFsoindivsd, EEFsogroupsd),
                              "VP - IW" = VP_EEF_Kil.combine %>% pull(text)),
       custom.model.names = c("Efficacy", 
                            "Internal Eff", 
                            "External Eff", 
                            "Individual Eff", 
                            "Group Eff"),
       custom.coef.map = list("VP" = "VP", 
                              "IW" = "IW", 
                              "morning" = "Morning session",
                              "Female" = "Female",
                              "HHHead" = "HouseholdHead",
                              "Kiswahili" = "Kisw Language",
                              "Parent" = "Parent",
                              "Literate" = "Literate",
                              "Muslim" = "Muslim",
                              "Political" = "Political",
                              "Wakaguru" = "Maj Ethnic Group",
                              "hh_size" = "Household Size",
                              "AgeBin" = "Age (binned)",
                              "Children" = "No. of Children",
                              "Standard" = "Child Grade",
                              "econindexSUM" = "SES",
                              "Education_num" = "Education",
                              "(Intercept)" = "Intercept"),
       include.ci = FALSE, single.row = TRUE, stars = c(0.01, 0.05, 0.1), 
       caption = "Study 2 Kilosa Efficacy Outcomes: Educational Efficacy score, Internal, External, Individual, and Group scores on VP and IW interventions (as opposed to SO) using OLS models with demographic covariates and school fixed effects. Below each model are the means and standard deviations for control groups.",
          label = "tab:RegTab1_Kil")
})

table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table, fixed=T)

table <- gsub("\\end{tabular}","\\end{tabular}}", table, fixed=T)

table <- gsub("[!htbp]", "[H]", table, fixed=T)

cat(table)

@

<<Kilosaregtable2, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 7, fig.height = 4, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, results='asis'>>=

# Outcome: Respected by Parents
RespectedbyParents.fit <- lm_robust(RespectedbyParents ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

RespectedbyParentsso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyParents, 
                                     na.rm = T), digits = 2) #mean and sd for SO
RespectedbyParentssosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyParents, 
                                     na.rm = T), digits = 2)

# Outcome: Respected by Authorities
RespectedbyAuth.fit <- lm_robust(RespectedbyAuth ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

RespectedbyAuthso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyAuth, 
                                     na.rm = T), digits = 2) #mean and sd for SO
RespectedbyAuthsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$RespectedbyAuth, 
                                     na.rm = T), digits = 2)

# Outcome: SC Ideas Respected
RespectedIdeas.fit <- lm_robust(RespectedIdeas ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

RespectedIdeasso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$RespectedIdeas, 
                                     na.rm = T), digits = 2) #mean and sd for SO
RespectedIdeassosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$RespectedIdeas, 
                                     na.rm = T), digits = 2)

# Outcome: Public Goods Mtg
PubGoodMtg.fit <- lm_robust(PubGoodMtg ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

PubGoodMtgso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodMtg, 
                                     na.rm = T), digits = 2) #mean and sd for SO
PubGoodMtgsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodMtg, 
                                     na.rm = T), digits = 2)

# Outcome: Public Goods Direct
PubGoodDirect.fit <- lm_robust(PubGoodDirect ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

PubGoodDirectso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodDirect, 
                                     na.rm = T), digits = 2) #mean and sd for SO
PubGoodDirectsosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$PubGoodDirect, 
                                     na.rm = T), digits = 2)

# Outcome: Support Pro-Education Candidate
Candidate.fit <- lm_robust(Candidate ~ VP + IW + morning +
               Female + HHhead + Kiswahili + Parent +
               Literate + Muslim + Political + Wakaguru +
               hh_size + AgeBin + Children + 
               Standard + econindexSUM +
               Education_num + 
               as.factor(schoolID),
               clusters = schoolID,
               alpha = .1, 
               data = studyKil)

Candidateso <- round(mean(studyKil[studyKil$ClassID == "Survey Only",]$Candidate, 
                                     na.rm = T), digits = 2) #mean and sd for SO
Candidatesosd <- round(sd(studyKil[studyKil$ClassID == "Survey Only",]$Candidate, 
                                     na.rm = T), digits = 2)

VP_Beh1_Kil.combine <- as.data.frame(rbind(mytidy(Candidate.fit),
                                  mytidy(PubGoodMtg.fit),
                                  mytidy(PubGoodDirect.fit),
                                  mytidy(RespectedbyParents.fit),
                                  mytidy(RespectedbyAuth.fit),
                                  mytidy(RespectedIdeas.fit))) %>%
  filter(term == "diff_vpiw") %>%
  mutate(text = paste0(round(estimate, 2), " (", round(std.error, 2), ")"))

## Create table
table <- capture.output({ # Store the stargazer output in a string
  texreg(list(Candidate.fit, 
              PubGoodMtg.fit,
              PubGoodDirect.fit,
              RespectedbyParents.fit,
              RespectedbyAuth.fit,
              RespectedIdeas.fit),
       custom.gof.rows = list("School FE" = c("Yes", "Yes", "Yes", "Yes", "Yes", "Yes"),
                              "Control Mean" = c(Candidateso, PubGoodMtgso, PubGoodDirectso,
                             RespectedbyParentsso, RespectedbyAuthso, RespectedIdeasso),
                              "Control SD" = c(Candidatesosd, PubGoodMtgsosd, PubGoodDirectsosd,
                             RespectedbyParentssosd, RespectedbyAuthsosd, RespectedIdeassosd),
                              "VP - IW" = VP_Beh1_Kil.combine %>% pull(text)),
       custom.model.names = c("Pro-Ed Candidate",
                            "Pub Goods Mtg", 
                            "Pub Goods Official",
                            "Respected Parents", 
                            "Respected Auth", 
                            "Ideas Respected"),
       custom.coef.map = list("VP" = "VP", 
                              "IW" = "IW", 
                              "morning" = "Morning session",
                              "Female" = "Female",
                              "HHHead" = "HouseholdHead",
                              "Kiswahili" = "Kisw Language",
                              "Parent" = "Parent",
                              "Literate" = "Literate",
                              "Muslim" = "Muslim",
                              "Political" = "Political",
                              "Wakaguru" = "Maj Ethnic Group",
                              "hh_size" = "Household Size",
                              "AgeBin" = "Age (binned)",
                              "Children" = "No. of Children",
                              "Standard" = "Child Grade",
                              "econindexSUM" = "SES",
                              "Education_num" = "Education",
                              "(Intercept)" = "Intercept"),
       include.ci = FALSE, single.row = TRUE, stars = c(0.01, 0.05, 0.1), 
       caption = "Study 2 Kilosa Behavioral and Respect Outcomes on VP and IW interventions (as opposed to SO) using OLS models with demographic covariates and school fixed effects. Below each model are the means and standard deviations for control groups.",
          label = "tab:RegTab2_Kil")
})

table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table, fixed=T)

table <- gsub("\\end{tabular}","\\end{tabular}}", table, fixed=T)

table <- gsub("[!htbp]", "[H]", table, fixed=T)

cat(table)


@


\newpage
\vspace{1cm}
\setstretch{1}
\bibliography{efficacyboost}

\end{document}
